Repository navigation
Lean context for delegate_task children: let a worker skip the orchestration instructions and orchestration tools
#21783
EmilioGinzo
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem
Every Claude thread T3 starts gets the same appended system prompt and the same
t3-codeMCPserver, whether it is the orchestrator a human talks to or a leaf child started with
delegate_taskto do one task. For a leaf child almost all of it is unused.We log every request our agents send. Over three days (2,429 sessions, 32,742 requests):
t3-codedeferred tool namesdelegate_taskt3_thread_launchlink_pull_requestThese tokens are written to the cache at every child start and re-read on every later request of
the child (12,439 requests in the window), and they also pull the child's attention toward
orchestration it is not supposed to do.
What we can and cannot do today
With a second Claude provider instance for workers (
launchArgs: --strict-mcp-config --disallowedTools "...", an env marker read by aSessionStarthook) anddelegate_task target.providerInstanceIdpointing at it, a real child's first request went from 30.0k to 12.7ktokens. Of those 12.7k, T3's appended text is now the largest single block: 3.3k tokens (26%),
plus 1.2k for the
t3-codetool names. What we cannot remove from outside T3:ClaudeAdapterV2.ts(systemPrompt.append); launcharguments cannot change it ([Bug]: --append-system-prompt-file in Claude launch arguments is silently ignored #13934);
t3-code, which a leaf child does not use.Proposal
runtimeInstructions: "full" | "worker" | "none"(defaultfull).workerkeeps<runtime_info>and PR linking, drops the orchestration, choose-workspace, visuals and ACPblocks, and drops the
orchestrationandworktreecapabilities from the thread's MCPcredential, so
tools/listshrinks too. This follows the existingbrowserToolsAvailablepattern (
mcpSession.ts,ProviderSessionManager.prepareMcpSession).instructions: "worker"ondelegate_task, applied whenappThread.lineage.creationSource === "mcp".makeClaudeQueryOptionshas no child flagtoday, but its only caller (
openQuery) hasturnInput.appThread.lineage, so passing it inis small.
adapt as well.
Either 1 or 2 would cover our case; 1 needs no change to orchestrator behaviour.
Related
still needs PR linking and the tools it is given.
t3-codeserver and its text.--append-system-promptin launch args never reaches the model.All reactions