Skip to content

Pack promotion misses natural-language server-name mentions (e.g. "claude-projects mcp" → workspace-critical not promoted) #77

Description

@samscarrow

Symptom

Prompt mentioning an MCP server by name (e.g. using the claude-projects mcp, …) does not promote the pack containing that server. Tools remain deferred and invisible to the model. The user only recovers by typing a fully-qualified tool name like mcp__claude-projects__claude_list_projects, which trips the explicit-mention rescue path.

Evidence (from ~/.tcp-shadow/proxy/decisions.jsonl, 2026-05-04 post-IMP-21)

Failed turn — 19:44:54 UTC

prompt: "using the claude-projects mcp, Replace updated files on claude.ai pontius project and upload new ones too"
tool_count_before/after: 5 -> 5
active_packs:    ["core-coding"]
deferred_packs:  ["workspace-critical"]   ← contains claude-projects
workspace_allowed_servers: ["bay-view-graph"]
claude-projects survivors: 0

Recovered turn — 19:45:38 UTC (user pasted explicit tool name)

prompt: "...e.g.: mcp__claude-projects__claude_list_projects"
tool_count_before/after: 293 -> 188
survivors include: mcp__claude-projects__claude_list_projects, claude_list_docs, claude_read_chat, ...

The recovery is the explicit-mention rescue, not a derivation win.

Diagnosis

Pack promotion appears to key on tool-name fragments / capability flags, not on server-name mentions in natural prose. "claude-projects" is the server identifier, not a tool keyword, so the workspace-critical pack stays deferred even though the user clearly named it.

Proposed direction (not pre-decided)

Add a server-name lexical signal to pack-promotion derivation: if a deferred pack contains server S and the prompt contains S (or a normalized form like S-mcp / S server / mcp__S__) as a token, promote the pack.

Edge cases to think through before implementing:

  • Server names that collide with English words.
  • Hyphen vs underscore normalization (claude-projects vs claude_projects vs mcp__claude-projects__*).
  • Whether to promote on mention alone, or require a co-occurring action verb.
  • Interaction with TCP-IMP-17 prompt-similarity ranking.

Relation to existing work

  • Concrete instance of the bottleneck named in CLAUDE.md: "Request derivation precision (5.4% in TCP-VAL-1). Hardening this logic is the top priority for unblocking the validation layer."
  • Should be measurable once TCP-MT-20 has enough scorable post-IMP-21 turns: this case would show as a strict miss with expected_tool_name not in tool_call_sequence because the tool was filtered out before the model could call it. Also note: expected_tool_name may itself be unset on filtered turns — telemetry interaction worth checking when this is repaired.

Repro

Issue any prompt of the form using the X mcp, do Y where server X is in a non-active pack. Inspect the resulting decisions.jsonl row and confirm X-pack stays in deferred_packs with zero survivors.

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