Skip to content

feat(server): delegation tools are always loaded and name the shell CLIs they replace - #67

Merged
lukemaj merged 2 commits into
mainfrom
feat/66-delegation-tools-always-loaded
Sep 29, 2026
Merged

lukemaj merged 2 commits into
mainfrom
feat/66-delegation-tools-always-loaded

Conversation

@lukemaj

@lukemaj lukemaj commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

What changed: Claude Code agents in T3 see the full descriptions of spawn_thread, read_thread, message_thread and prism_submit from the first turn, and those descriptions say to use them instead of agent CLIs in the shell.
Why: The tools were deferred, so agents saw only names; a planner asked for a Luna review ran codex exec in the shell, invisible to the user.
So what: Independent review approved; you approve the merge and install the build, then a fresh thread confirms agents pick spawn_thread.

Closes #66.

  • apps/server/src/mcp/alwaysLoad.ts: _meta["anthropic/alwaysLoad"] on the four delegation tools only; the other 29 t3-code tools stay deferred.
  • spawn_thread and prism_submit descriptions rewritten trigger-first (toolboxmd/building-agentskills docs/05-authoring/triggers.md, obra/superpowers writing-skills): when to use, the shell alternative they replace, then the minimum mechanics. 528 and 470 characters.
  • <t3_code_tool_use> launch paragraph names codex exec, claude -p, opencode run and grok in the shell. This is the only channel for Codex, OpenCode and Grok.

Elon record

  • Requirements and who asked: the user (2026-09-29) asked to load the delegation tool descriptions instead of deferring them, and to write them with the skill-description guidance.
  • Deleted: a PreToolUse hook blocking agent CLIs (user: last resort), server-wide alwaysLoad (all 33 tools every turn, startup waits up to 5 s), edits to other tools.
  • Bottleneck: the planner never sees delegation guidance when it chooses how to run a review.
  • Checked myself: a local stdio MCP server with one _meta-marked and one unmarked tool: Claude Code 2.1.284 debug log reported 0/19 deferred tools with the mark and 0/20 without. T3 connects over HTTP; the same behavior there is inferred until the post-install check.

Proof: vp test run src/mcp/alwaysLoad.test.ts src/mcp/toolInstructions.test.ts (10 passed); tsc --noEmit in apps/server passes; vp fmt --check and vp lint on apps/server/src/mcp clean apart from one existing warning in device/handlers.ts.

Review: Luna max (Codex gpt-6-luna). Round 1 on cb7ba42 requested one change (the spawn_thread description dropped that a role applies its kit); fixed in b8a109a. Round 2 on b8a109a: APPROVE.

🤖 Generated with Claude Code

…LIs they replace (#66)

spawn_thread, read_thread, message_thread and prism_submit carry
_meta["anthropic/alwaysLoad"], so Claude Code shows their descriptions
from the first turn instead of deferring them behind tool search. The
spawn_thread and prism_submit descriptions and the launch paragraph now
say when to use them and name codex exec, claude -p, opencode run and
grok in the shell as what they replace.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:S labels Sep 29, 2026
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.5 KiB 13.5 KiB −7 B (−0.1%) 15.1 KiB ✅
Codex Thread snapshot wire 7.1 KiB 7.1 KiB −9 B (−0.1%) 7.3 KiB ✅
Codex Live turn WebSocket wire 6.4 KiB 6.4 KiB +2 B (+0.0%) 7.8 KiB ✅
Codex Live turn WebSocket decoded 56.2 KiB 56.2 KiB 0 B (0.0%) 66.4 KiB ✅
Codex Live turn messages 9 9 0 (0.0%) 21 ✅
Claude Total thread wire 13.5 KiB 13.5 KiB −23 B (−0.2%) 15.1 KiB ✅
Claude Thread snapshot wire 7.1 KiB 7.1 KiB 0 B (0.0%) 7.3 KiB ✅
Claude Live turn WebSocket wire 6.5 KiB 6.4 KiB −23 B (−0.3%) 7.8 KiB ✅
Claude Live turn WebSocket decoded 57.1 KiB 57.0 KiB −44 B (−0.1%) 66.4 KiB ✅
Claude Live turn messages 10 9 −1 (−10.0%) 21 ✅

Baseline: 26b5c3f · PR result: b8a109a · 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: 113.9 KiB
  • Claude decoded thread snapshot: 114.6 KiB

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

@lukemaj
lukemaj merged commit f8a22e9 into main Sep 29, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Delegation tools are always loaded and name the shell CLIs they replace

1 participant