Repository navigation
Replies: 1 comment
|
The opt-in makes sense, and the default should stay isolated. Three observations from running delegated work that might shape what the handoff carries. Paraphrase drift bites hardest on constraints. I once wrote a dispatch brief that added one convenience clause to a boundary the user had set, and three child agents acted on the wider version. What fixed it was copying the user's own words into the brief verbatim. A portable summary of the parent has the same exposure, so it would help if user statements arrived quoted and attributed, with only the assistant's side summarised. Review children are the case where less context is better. A reviewer seeded with the parent's account of the work tends to confirm that account, because it inherits the same omissions. For cross-provider review I would want a mode that passes the user's requirements and the artefact and leaves the parent's reasoning out. The seeded context is also re-sent on every step the child takes, so a cap per delegation matters more than a cap per handoff when a child runs long. Can the handoff builder already tell user turns from assistant turns? Drafted with Claude Code and reviewed by me before posting. |
Uh oh!
There was an error while loading. Please reload this page.
Summary
Let an agent ask
delegate_taskto seed the child with a budgeted, attributed summary of the parent conversation, using the existing portable context handoff, while keeping today's prompt-only behavior as the default.Problem to solve
A delegated child receives only the task prompt; the tool description says it runs "with only the supplied task prompt, without copying parent conversation history". That isolation is a good default, but many delegations depend on a long preceding discussion: decisions the user made, constraints they stated, findings from earlier turns, and rejected approaches. Today the parent must restate all of that in a self-contained brief. That costs tokens, depends on the parent's paraphrase, and drifts from what the user actually said, which matters most for cross-provider review where the reviewer should see the original requirements.
t3_thread_forkdoes carry history into a new thread through native or portable context, but a fork has no task identity,task_status, or automatic completion delivery to the parent.Proposed behavior
delegate_taskaccepts an optional context choice. The default keeps today's behavior exactly: the child sees only the task prompt. When the agent opts in, the child's first turn also receives a portable handoff of the parent conversation up to the delegating turn, built and budgeted by the same mechanism used for forks and provider switches, attributed and kept separate from the task prompt. The task lifecycle (taskId,task_status,task_cancel, automatic completion delivery) is unchanged.Acceptance criteria
delegate_taskcall without the new option produces a child whose input contains only the task prompt, as asserted by the existing prompt-isolation integration test.T3CODE_CONTEXT_HANDOFF_TOKEN_CAP), and the child can retrieve omitted history through the same retrieval references a portable fork provides.t3_thread_transfersfor the child with its resolution.Affected area
The
delegate_taskcontract inpackages/contracts/src/orchestratorMcp.tsand its description inapps/server/src/mcp/toolkits/orchestrator/tools.ts(L61), child creation inapps/server/src/orchestration-v2/Orchestrator.ts, and the existing portable handoff machinery (ContextHandoffBudget.ts, portable context transfers).Non-goals
Alternatives considered
Supporting context
The handoff budget is defined at ContextHandoffBudget.ts:14. No existing request for parent-context seeding of delegated tasks was found; discussion #6689 has a related comment about subagents that share existing context.
All reactions