Skip to content

feat(server): describe the general delegate_task role - #76

Closed
orbitingflea wants to merge 1 commit into
mainfrom
fork/standalone-role
Closed

orbitingflea wants to merge 1 commit into
mainfrom
fork/standalone-role

Conversation

@orbitingflea

Copy link
Copy Markdown
Owner

What

Agents now see when to pick the general role of delegate_task, the tool that starts a child, which is a thread started by another thread. The role field gets the description "general: Use for multi-step tasks, such as making a PR." Nothing changes on screen, and a child starts as it did before. A new test shows that a general child starts the same way as a thread opened from the sidebar.

Why

Our goal is that a parent with a multi-step task starts a child that works like a sidebar thread. The general role already does this, because it sends the child only the task text. Leaving out role does the same. The tool text did not say when to use general, so nothing steered agents away from the specialized roles.

How

  • The test builds the first Claude request of a sidebar thread and of a general child through the real code, at effort medium and high, and checks that they are equal. It also checks that the lists of tools the two threads can call differ only by watch_pull_request and unwatch_pull_request.
  • The text agents receive grows by 74 bytes. CI checks that size against a recorded limit, so this PR raises the limit and needs the agent-context-increase label.

The evals that AGENTS.md names were not run, because no API key was available, so no model has been tested on the new text. A free dry run shows that the first request changes in 15 of 146 eval cases, only in the delegate_task schema.

Files
  • orchestratorMcp.ts holds the description.
  • agentContextBudget.json holds the limit.
  • ProviderReplayHarness gets a configureMcp option, so the test can set up tools as a real Claude thread does.
  • generalRoleParity.test.ts is the new, fork-only test. It leaves out ids, the MCP token and CLAUDE_CODE_PROMPT_CACHE_TTL, which a child takes from the subagentPromptCacheTtl setting.

The role field of delegate_task now says "`general`: Use for multi-step
tasks, such as making a PR." A general child gets the task text alone, so
its first Claude request already matches a sidebar thread's.

- contracts: the description on the role field.
- agentContextBudget: the tool list grows by 74 bytes.
- ProviderReplayHarness: a configureMcp option, so a test can build the
  MCP setup that a Claude thread gets.
- fork/generalRoleParity.test.ts: a general child's first Claude request
  equals a sidebar thread's at effort medium and high, with an inherited
  and an explicit target; a child lists every MCP tool a sidebar thread
  does except watch_pull_request and unwatch_pull_request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@orbitingflea orbitingflea added the agent-context-increase Accepts growth of the text agents receive label Nov 4, 2026
Copilot AI balanced review requested due to automatic review settings November 4, 2026 22:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:S labels Nov 4, 2026
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅
Codex Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Codex Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Codex Live turn WebSocket decoded 21.5 KiB 21.5 KiB 0 B (0.0%) 24.4 KiB ✅
Codex Live turn messages 1 1 0 (0.0%) 8 ✅
Claude Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅
Claude Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Claude Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Claude Live turn WebSocket decoded 21.9 KiB 21.9 KiB 0 B (0.0%) 24.4 KiB ✅
Claude Live turn messages 1 1 0 (0.0%) 8 ✅

Baseline: de5ec0b · PR result: c0e72b9 · Source CI: success

Scenario and decoded snapshot size

10 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.

  • Codex decoded thread snapshot: 108.5 KiB
  • Claude decoded thread snapshot: 108.8 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@orbitingflea

Copy link
Copy Markdown
Owner Author

Closed without merge. The person chose to leave T3's tool text as it is. Our bot instructions already tell bots to give each task to its own worker with role general.

@orbitingflea
orbitingflea deleted the fork/standalone-role branch November 4, 2026 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-context-increase Accepts growth of the text agents receive size:S vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants