Repository navigation
fix(j5): Claude opens new threads with j5_spawn_agent again - #1239
Merged
Merged
Conversation
J5's Peer Agent line named j5_spawn_agent only for an explicit Peer Agent or a standalone agent, so on v0.1.11 Sonnet answered "open N new threads" with delegate_task. The line now names new and other threads, rules out delegate_task and Subagents for them, keeps forks on t3_thread_transfer, and routes an @persona:ID in such a request to persona. Closes #1208 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
This review includes 3 billable files and costs up to $0.75.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 34 minutes for your next included review. View limit details
|
Jacksondr5
added a commit
that referenced
this pull request
Nov 24, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7 of 8 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.
Problem
On v0.1.11, Claude Sonnet answers "open three new threads" with
delegate_taskchildren instead ofj5_spawn_agentPeer Agents, then tells the user it opened threads. The advance's eval report traced the drop to upstream's new Claude-only "Text the user must read mid-turn" section, but J5's own Peer Agent line was already weak. It namedj5_spawn_agentonly for an explicit Peer Agent or standalone agent, never for a "new thread". Upstream's section is unchanged here.Closes #1208
What changed
One sentence in J5's Peer Agent bullet (
packages/provider-core/src/j5/orchestrationInstructions.ts, section 3 of the Codex context entries). Jackson reviews agent-instruction changes himself, so here is the whole bullet's first two sentences, old and new:j5/main)j5_spawn_agentwhen the user explicitly asks for a Peer Agent or a standalone agent they will talk to, or when a skill you are following names it. When nobody asked for one, …j5_spawn_agentwhen the user asks for a new thread or another thread, a Peer Agent, or a standalone agent they will talk to, or when a skill you are following names it; neverdelegate_taskor a Subagent for those, andt3_thread_transferonly to fork this conversation. An@persona:IDin that request goes inpersona. When nobody asked for one, …Each clause is there because an eval round needed it:
delegate_taskor a Subagent", and the@personarouting. Every new-thread case passed on Claude exceptj5-tt-another-thread-worktree(1/3). Asked for "another thread … using a fresh worktree", Claude still pickeddelegate_task, which the subagent bullet points worktree work at.t3_thread_transferonly to fork this conversation". The fork control went back to 3/3. This is the shipped text.I left the tool descriptions of
j5_spawn_agentanddelegate_taskalone. The issue suggested changing them too, but in Claude Code the choice happens at ToolSearch, before any description loads, and the instruction change alone was enough.Context budget: +178 bytes on both Claude's system append and Codex's additional context.
agentContextBudget.jsonnow readsclaudeSystemAppendBytes20621 (was 20443) andcodexAdditionalContextBytes22005 (was 21827). The section is 2,821 bytes, under Codex's 4,000-byte limit per entry. Section 1, which is at 3,993 bytes, is untouched.Evals
Runner:
evals/j5-clifrom #1228,--catalog j5, 3 samples per case,--shards 1. Claude Code 2.1.326 withclaude-sonnet-5-5(high effort), and Codex 0.169.0 withgpt-6.1-sol(high effort). "Before" isj5/mainataabc4a14c2(runner commitab0a63bdf9); v3 is runner commit07b8fe50d8, and its instruction text is identical to this branch's. A case fails when half or more of its samples fail (evals/README.md).j5-tt-three-new-threads-one-per-bugj5-persona-new-thread-uses-spawnj5-delegates-then-new-thread-with-modelj5-tt-another-thread-worktreej5-tt-thread-in-another-projectj5-persona-mention-uses-delegatej5-fork-thread-uses-transferj5-tt-new-chat-handoff-cross-providerthree-new-threads).three-new-threadsforked witht3_thread_transfer, which the report listed as pre-existing; that case is now 3/3.j5-persona-mention-uses-delegatefails 0/3 on Claude before and after. On a bare@persona:reviewermention, Sonnet callsdelegate_taskwithoutpersona, as the advance report found on both builds. The wording here doesn't change it, and fixing it would mean editing section 1, which is full.Usage (subscriptions; Claude Code's API-price figure measures load, not spend):
The shell simulator (
claude-haiku-5-5) used under 9,000 input tokens per run, about $0.00.Upstream impact
apps/server/src/provider/agentContextBudget.json: data under FORK.md case 110. The new values are what the test measures.orchestrationInstructions.tsand its test are J5-owned. Upstream'sCLAUDE_SEND_TO_USER_INSTRUCTIONSis not touched.Checklist
AgentContextBudget.test.tspassesagentContextBudget.jsonis case 110's data file. Its FORK.md text records the advance-time numbers and is unchangedClaude Opus 5.5 in Claude Code (J5 Code).
🤖 Generated with Claude Code