Repository navigation
fix(server): Claude /compact and Claude-initiated turns no longer end the user's turn; subagents show their own model - #973
Merged
Conversation
…ad busy (#14497) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> (cherry picked from commit 9da066dbe906310671b86290b09df0b56a88ffa5)
… parent's model (#14540) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> (cherry picked from commit 7ab800a43c770b2c48a2d9306c89b6177f61ad4a)
… Pylon's handshake guard
Contributor
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
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.
Problem
Two Claude adapter bugs from upstream apply to Pylon:
/compactthen ran with no turn open and the thread looked busy afterwards. Pylon's zero-turn handshake guard hides this only when the notification turn makes no model request. A notification that Claude answers ends the user's turn early.Fix
handleResultMessageignores a result that answers a different Claude turn. A result for another turn echoes prompt uuids that do not include the active turn id, or it echoes nothing and has a non-humanorigin. Results from older CLIs with neither field still complete the turn. Synthetic turns are unchanged. Pylon steers send no uuid, but the SDK'suser_message_uuidskeeps the turn's own prompt uuid alongside any folded-in steer, so steered turns still complete.task.updatedat once. A boundedtool_use_id → parent_tool_use_idmap letstask_startedfind the owning subagent and seed a nested agent with its owner's model. Pylon's resume carry-over (previousAgent.model) still ranks above the owner's model.The Claude adapter edits stay out of
startSessionInternal, except for two lines that add the new map to the session context. They merge cleanly withfix/claude-resume-unsaved-first-turn.Sources (upstream cycle #967)
9da066dbe906310671b86290b09df0b56a88ffa5(#14497)/compactno longer ends early and leaves the thread busynum_turns: 0form. Added a steered-turn regression test.7ab800a43c770b2c48a2d9306c89b6177f61ad4a(#14540)offerRuntimeEvent(sessionIncarnationId, …)signature and resume model carry-over were kept.bd89c1302026255c62cc09278207bfaf2664da4a(#14486)compatibilityranges. Pylon's manifest has nocompatibilitysection because the version-compatibility pipeline (96c4bfa0a2,d4cd7d5c33) is still held, and Pylon has no Grok version floor. Pylon's only CLI floor is the provider-localMINIMUM_CODEX_CLI_VERSIONinCodexProvider.ts. Follow-up candidate: a matching provider-local Grok floor (>=1.0.13, because xAI returns426 Upgrade Requiredto older CLIs) inGrokProvider.ts.Verification
vp test run src/provider/Layers/ClaudeAdapter.test.ts: 184 passed. Run withCLAUDE_CODE_ENABLE_TODO_TOOLSunset, since the harness host leaks it into one existing env test.keeps a turn open past the result of a Claude-initiated turnandcompletes a steered turn from a result that echoes its folded-in promptsfail.task.started carries model/effort; subagent snapshots refine the modelfails.vp run -F t3 typecheckpasses.vp checkon the changed files passes.git merge-treewithfix/claude-resume-unsaved-first-turn: clean.Backend only, no UI evidence.
Claude Opus 5.5 in Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.