Repository navigation
Closed
Description
Follow-ups the fix round on fork/mcp-profile-t3-tool-groups left, from the two lenses on #806:
Lens A and
Lens B. Both said SAFE; none of these widens what a thread can reach.
- Settings help text for
t3Tools(PR MCP profiles: Settings section and thread pick logic (design PR 3) #804, MCP profiles part 3) (Lens A minor 1). Add one sentence there: "Profiles are not a sandbox: only requests that come from a thread are filtered. A request with no thread (an OAuth client, thet3 threadCLI, a script run from a shell with the owner's access) gets every T3 tool." The docs (docs/fork/README.md,server.mcpProfiles) now say this. The agent-facing refusal text deliberately does not, so it does not point a refused agent at the way around. - Claude: the set is fixed before the turn is known to start (Lens B minor 2).
fixT3ToolSetruns inplanForbefore the continuation early return and beforeClaudeBackgroundWorkBlocksQueryReplacementError. When the profile changed and the next turn is refused because background work still runs, the new set applies at once to the old process's background work. A continuation turn also fixes the set again while it keeps the old process and its old tool list. Fix: fix the set only once the query is really used, or say so in the README. - A
t3Tools-only change restarts the Claude process (Lens B minor 3).planKeyincludes the groups, so a change costs a prompt-cache miss and, with background work running, refuses the next turn until it ends.notifications/tools/list_changedto the thread's live MCP session could refresh the list without a restart. This was not done in the fix round: it needs a server push to the thread's session at turn start, and a check of how Claude Code handleslist_changed, so it is not small. McpToolExposure.tsimport chain (Lens B minor 4). It importsfork/mcpT3ToolFilter.ts, which pulls inclaudeMcpProfile,ProjectionStoreand all toolkits. There is no cycle today. Trimming it means a small entry module the rule installs its filter into, which changes the import line fork seams: announce the tool_search filter lines (MCP profile design PR 4, step 1) #806 announces and the file names its seam text gives. So do it together with a seam-list update, not in a code-only fix round.- A Refused set from a one-off read error lasts the turn (Lens A minor 3). When a request (not a turn start) works out a set and the settings read fails once,
rememberT3ToolSetkeeps the Refused set until the next turn. It fails closed. Consider not remembering a Refused set that came from a read error. Without the memory, though, a list request would read the settings once per tool, so it needs a short negative cache. - Design doc §6 (Lens A minor 2) says the set lives on the credential. The code keeps a per-thread map (
fork/mcpT3ToolSets.ts). The fork README now says "per thread, not per credential". Update the design doc to match. - Cap of 4096 remembered sets (Lens A minor 5). Past it, the oldest thread's set is worked out again from the current settings mid-turn. That is never wider than those settings, but "applies from the next turn" does not hold then. Leave it as is, or document it.
Done in the fix round (for the record): a test that the filter's toolkit table matches the toolkit folders tool for tool, plus every group of MCP_T3_TOOL_GROUPS has a tool (Lens B major). The "a tool in no group" refusal now says it is a T3 bug. The README now says profiles are not a sandbox, and mentions the t3_thread_send confused deputy (Lens A minor 6). The comment on searchableT3Tool now says to call it only inside a request (Lens A minor 4).
Metadata
Metadata
Assignees
Labels
No labels
Activity
MCP profiles: follow-ups for Codex and the T3 tool rule (#812, #814, #…
MCP profiles: follow-ups for Codex and the T3 tool rule (#812, #814, #…
MCP profiles: follow-ups for Codex and the T3 tool rule (#812, #814, #…