This repository was archived by the owner on Aug 6, 2026. It is now read-only.
feat(loops): Run a skill instead of instructions - #3741
Merged
Conversation
|
😎 This pull request was merged. |
2 tasks
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
Contributor
Prompt To Fix All With AIFix the following 2 code review issues. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 2
packages/ui/src/features/loops/components/LoopDetailView.tsx:325
**Missing bundles crash loop views**
When the older backend described in this PR omits `skill_bundles`, this unconditional `.length` access throws during rendering. The edit path also indexes the absent field in `primaryLoopSkillBundle`, so users cannot view or edit loops until the backend deployment completes.
### Issue 2 of 2
packages/ui/src/features/loops/components/LoopForm.tsx:145-153
**Failed uploads leave incomplete loops**
When dependency resolution, local bundling, or bundle upload fails, the loop has already been persisted with `/skill-name` instructions, and this catch only shows a toast before navigating away. The loop can then fire without the matching skill artifact, causing the run to receive the invocation without the selected skill definition.
Reviews (1): Last reviewed commit: "let loops run a skill instead of instruc..." | Re-trigger Greptile |
PR overviewAll previously flagged issues have been addressed. No open security concerns remain on this pull request. Security reviewNo open security issues remain on this pull request. Fixed/addressed: 4 · PR risk: 0/10 |
Contributor
|
👋 Visual changes detected for this PR. Review and approve in PostHog Visual Review If these changes are unexpected, they may be caused by a flaky test or a broken snapshot on master. Don't approve — rerun the job or wait for a fix. |
tatoalo
approved these changes
Jul 23, 2026
charlesvien
force-pushed
the
feat/loop-skills
branch
2 times, most recently
from
July 24, 2026 04:28
1c13ce3 to
1d0f2a9
Compare
charlesvien
force-pushed
the
feat/loop-skills
branch
from
July 24, 2026 07:22
6abbc55 to
c40e35a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A loop's prompt is a free-form instructions blob. Teams that already maintain skills have no way to point a loop at one, so the same playbook gets pasted into instructions and drifts from the skill.
Changes
The loop form's prompt step gains a source choice: write instructions or run a skill. Picking a local skill zips it (plus its skill dependencies) via workspace-server on save and uploads the set through the new
PUT /loops/{id}/skill_bundles/endpoint, and the loop's instructions become/skill-nameplus an optional context field. The backend seeds those bundles into every fired run, where the sandbox agent-server already installsskill_bundleartifacts.The loop detail page shows the attached skill with its snapshot digest and an "Update from local skill" button to re-snapshot after editing the skill. On hosts without a local filesystem (web) the picker is hidden; an attached skill can still be kept or detached.
Requires PostHog/posthog#73069 to be deployed first; until then the skill_bundles endpoint 404s and
loop.skill_bundlesis absent.How did you test this?
Unit tests for the new instruction build/parse helpers and the form round-trip (skill mode validity, derived instructions, attached-snapshot mapping) via
pnpm --filter @posthog/ui test. Fullpnpm typecheckand Biome lint are clean. Not exercised against a live backend since the API only exists in the paired posthog PR.Automatic notifications