Skip to content

fix: CatAgent mcpPromptMode capability — stop injecting dead MCP docs #59

Description

@bouillipx

Problem

CatAgent has mcpSupport: true but doesn't actually support native MCP or HTTP callbacks:

  • mcpSupport: truemcpAvailable = true → S13 MCP_TOOLS_SECTION injected → CatAgent sees cat_cafe_search_evidence etc. but can't call them (no MCP client)
  • Setting mcpSupport: falsemcpAvailable = falseneedsMcpInjection = true → C1 HTTP callback docs injected → CatAgent L0/L1 has no shell/curl to use them

Both states produce dead prompt documentation.

Solution (Design Gate passed by @codex)

Phase 1 (this issue): Route capability cleanup

Add mcpPromptMode() capability to AgentService interface:

  • 'native-mcp' — inject S13 MCP docs (Claude)
  • 'http-callback' — inject C1 HTTP callback (Codex/Gemini)
  • 'none' — inject neither (CatAgent pre-bridge)

Changes:

  • types.ts: add mcpPromptMode?() to AgentService
  • CatAgentService.ts: return 'none'
  • route-serial.ts + route-parallel.ts: use centralized resolveMcpPromptInjection() helper
  • McpPromptInjector.ts: update to accept mode enum
  • Tests: verify CatAgent gets neither S13 nor C1 in both serial/parallel

Future phases (separate issues)

  • Phase 2a: Direct internal capability tools (cat_cafe_search_evidence etc. as CatAgent native tools)
  • Phase 2b: Cat-cafe MCP bridge (full MCP protocol)
  • Phase 3: Skill prompt loader
  • Phase 4: Restore mcpSupport: true semantic

Evidence

  • McpPromptInjector.ts:40-43: needsMcpInjection = !mcpAvailable
  • SystemPromptBuilder.ts:607-608: if (mcpAvailable) { lines.push(MCP_TOOLS_SECTION) }
  • route-serial.ts:581: mcpAvailable = (mcpSupport ?? false) && !!mcpServerPath

Verification

  • CatAgent serial invocation prompt does NOT contain cat_cafe_search_evidence
  • CatAgent serial invocation prompt does NOT contain HTTP 回调
  • CatAgent parallel invocation prompt does NOT contain either
  • Non-CatAgent providers unchanged (zero back-compat break)

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions