Repository navigation
fix(skills): run the skills in the conversation of the agent, not in a forked context - #285
Merged
Merged
Conversation
…a forked context A skill with context: fork runs in a subagent that does not get the conversation, so it does not know the URL the user gave or the page the agent opened. In the MCP evals (npm run eval:mcp, devtools-skill) the forked skill failed every time it was invoked, answering "no page to measure" or "the task gave no URL", and the agent went on by itself with more turns and tokens. The generator no longer writes context: fork in the category skills or the webperf router, and a test fails if a generated SKILL.md carries it.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
4 of 5 tasks
This branch was successfully deployed
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
The generated skills (
skills/,.claude/skills/) carriedcontext: fork. A forked skill runs in a subagent that does not receive the conversation: it has no URL and no open page, so it cannot measure anything. In the chapter 6 measurement (#284) the forked skill failed 3 of 3 invocations ("no page to measure", "the task gave no URL").scripts/generate-skills.jsstops writingcontext: forkin the category skills and in thewebperfrouter (dist/never had it).scripts/skill-guidance.test.jsfails if any generatedSKILL.mdcarriescontext: fork.Measurement
npm run eval:mcp -- --arm devtools-skill --repeat 3, medians, before (with fork) and after:sourcePath)Without the fork the skill works: it sees the page and the URL, and in one LCP run it executed the published LCP-Subparts by
sourcePath. Cost does not change in a meaningful way; this fixes a failure, it does not make the runs cheaper. The agent still often prefers the trace or its own observer, which is left for phase 8b (pushing the skill instructions towards running the published scripts).Test plan
npm run test:skills: 179/179, locally; the new test failed 12/12 before the change in the generatornpm run generate-skills: regenerates only the 12SKILL.mdfiles of this diff, locallynpm run eval:mcp -- --arm devtools-skill --repeat 3before and after, locally (results above)