Skip to content

feat(mcp): extend deferred tool loading to the CI-fix session (and evaluate Planner) #193

Description

@OGtwelve

Problem

Deferred MCP tool loading (#119) mounts the surplus/tool_search surface on the Worker and Reviewer only. The CI-fix session builds its Worker tools via resolveWorkerTools(...) directly with no mountDeferredTools (packages/aitm/src/loop/run-loop-adapter.ts, runCiFix wiring), and the Planner is likewise excluded. #119 called this a "separate follow-up"; it was never filed. The CI-fix Worker is one of the roles that most needs domain MCP tools (reading logs, querying services to fix a failure).

What

Extend the mountDeferredTools composition (surplus split by mcpDeferToolsOver, tool_search, activation set, index block, composed into the same prepareStep as compaction) to the CI-fix Worker. Evaluate the Planner too (read-heavy recon) and include it if the threshold logic fits; otherwise note why it stays out.

Constraints (per CLAUDE.md)

Portable ESM, strict TS, paired *.test.ts; aitm is MCP client only.

Acceptance criteria

  • With more MCP tools than the defer threshold, the CI-fix Worker gets a name-only index + working tool_search activation, matching Worker/Reviewer behavior.
  • bun test + node --test + biome + tsc all green (both packages).

Found during the post-epic-#100 parity verification pass (B7). The #119 follow-up. P2 follow-up.

Part of #196.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/backendenhancementNew feature or requestsize/4h~half a day — substantial, design work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions