fix(upgrade): scope the claude-code-guide freshness spawn to survive its context window - #1659
Open
elhoim wants to merge 1 commit into
Open
fix(upgrade): scope the claude-code-guide freshness spawn to survive its context window#1659elhoim wants to merge 1 commit into
elhoim wants to merge 1 commit into
Conversation
…its context window The Step 2a freshness check asked one claude-code-guide spawn to cover the whole API surface at once — hook events, settings fields, slash commands, SKILL.md frontmatter, subagent frontmatter, MCP, Agent SDK and Claude API. That agent runs on a small-context model (haiku, 200k). A request that broad makes it fan out a batch of documentation fetches whose combined results exceed the window on the very next request, so it dies with 'Prompt is too long' roughly ten seconds in, having returned nothing. Observed 2026-07-26: five sibling Explore agents in the same batch all completed; only the claude-code-guide spawn failed. The prompt text is not the problem — a trivial prompt to the same agent type runs fine. The tool-result volume is. Cap the ask at three areas per spawn, tell it to look things up rather than pull whole pages, and split the surface across parallel spawns so losing one costs a slice instead of the whole check. Records the CHANGELOG raw URL already in sources.json as the fallback, and adds the lesson to the skill's Gotchas.
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.
What happened
The Upgrade skill's Step 2a freshness check spawns
claude-code-guideand asks it to cover the whole Claude Code API surface in one go — hook event types,settings.jsonfields, slash commands,SKILL.mdfrontmatter, subagent frontmatter, MCP, Agent SDK and Claude API.On a real run it died with
Prompt is too longabout ten seconds after spawn, returning nothing. Five siblingExploreagents dispatched in the same batch all completed normally.Why
claude-code-guideruns on a small-context model — the spawn record shows"model":"haiku", which is a 200k window, and no model was passed at the call site.The prompt itself is not the problem. Ruled out by measurement:
Reply with exactly the word: OK) to the same agent type, in the same session, spawned when the parent conversation was larger, completed normally and returnedOK.Same agent, same model pin, same inherited context, opposite outcome — the only variable is how much the prompt makes it fetch. A request that broad makes the agent fan out a batch of documentation lookups in its first turn, and their combined results exceed the window on the very next request. The ~10s timing matches a first tool-call turn returning rather than any slow accumulation.
The fix
claude-code/CHANGELOG.mdraw URL is already insources.json, and reading the version range directly answers most freshness questions without an agent at all.## Gotchas, including the diagnostic tell — the sibling agents succeed while this one dies, which points at the model rather than the batch.