REQ-MCP-015: Duplicates, errors, and denials return corrective guidance, not bare failure

← Requirements

What it requires

  1. Given a tool called twice with identical arguments, When the second call is processed, Then it is rejected with the previous result and do-not-retry guidance rather than re-executing; Given a call that errored, When it is repeated, Then it is not treated as a cached duplicate; Given filesystem.read_file, Then skip_duplicate_check is true.
tier
NOT_RUN

Where it lives

  • src/mcp16

See it on the map

How it is met

implemented byresults (61 tests)check_dup_or_approvalcheck_duplicatecheck_repeated_failurecreate_circuit_breaker_messagecreate_denied_messagecreate_duplicate_messagecreate_error_messagefinalize_tool_callhandle_duplicaterecord_tool_callskip_duplicate_checkskip_duplicate_checkskip_duplicate_checkskip_duplicate_checktool_call_keytool_error_json61 absent61 tests, a summary by result: every test is in the tests table below

Show on the map

Implemented by

Tests (61)

Linked directly

1 test: 1 absent

testresultlinked byimplementers exercisedcalls away
skip_duplicate_checkabsenttagunknown—
Reached through calls

60 tests: 60 absent

testresultlinked byimplementers exercisedcalls away
Default skip duplicate checkabsentinferred1 of 16: skip_duplicate_check1
skip_duplicate_check delegates and falls back to falseabsentinferred1 of 16: skip_duplicate_check1
A call that fails identically is refused rather than retried absentinferred10 of 163
Anti-spiral hard block stops dispatch and emits absentinferred10 of 163
Anti-spiral hard block uses derived default when sentinel setabsentinferred10 of 163
Auto approve skips callbackabsentinferred10 of 163
Chained POST_TOOL_CALL hooks: last write winsabsentinferred10 of 163
Circuit breaker at threeabsentinferred10 of 163
Duplicate counter resetsabsentinferred10 of 163
Duplicate detection skipsabsentinferred10 of 163
Error result not cached for dedupabsentinferred10 of 163
Headless mode denies without callbackabsentinferred10 of 163
Max tool calls per turnabsentinferred10 of 163
Multiple tool calls in batchabsentinferred10 of 163
POST_TOOL_CALL fires on duplicate rejection with kindabsentinferred10 of 163
POST_TOOL_CALL fires on schema rejection with kindabsentinferred10 of 163
POST_TOOL_CALL hook transforms duplicate-rejection contentabsentinferred10 of 163
POST_TOOL_CALL hook transforms schema-rejection contentabsentinferred10 of 163
POST_TOOL_CALL hook transforms successful tool result contentabsentinferred10 of 163
POST_TOOL_CALL with *modified_json == NULL leaves content untouchedabsentinferred10 of 163
PRE/POST_TOOL_CALL fire for successful callsabsentinferred10 of 163
PRE_TOOL_CALL cancel short-circuits dispatch and still fires POSTabsentinferred10 of 163
Permission denied returns feedbackabsentinferred10 of 163
Process single tool callabsentinferred10 of 163
Schema validation rejects invalid enum valueabsentinferred10 of 163
Schema validation rejects missing required fieldabsentinferred10 of 163
Tool call history records successful executionsabsentinferred10 of 163
Tool emits directives → ToolExecutor extracts + dispatches themabsentinferred10 of 163
Tool executor processes calls via ServerManagerabsentinferred10 of 163
effective_max_tool_calls_per_turn overrides global limitabsentinferred10 of 163
gh#111: POST_TOOL_CALL hook returning malformed UTF-8 is absentinferred10 of 163
gh#143: an argument-free call serialises as an object absentinferred10 of 163
gh#143: an argument-free call to a no-required-fields tool absentinferred10 of 163
gh#143: dispatch converts a throwing tool into a tool errorabsentinferred10 of 163
gh#168: a rewritten payload carrying bad UTF-8 is sanitized, absentinferred10 of 163
gh#168: the rewrite is visible to the dup cache and POST hookabsentinferred10 of 163
gh#190: a structured JSON error counts as a failure everywhereabsentinferred10 of 163
gh#211: a tier that declares an EMPTY allowlist may call nothingabsentinferred10 of 163
gh#83: allowlisted tool dispatches normallyabsentinferred10 of 163
gh#83: empty locked_tier bypasses enforcementabsentinferred10 of 163
gh#83: no map wired = pass-through (pre-v2.5.2 behavior)absentinferred10 of 163
gh#83: off-allowlist tool is rejected_unauthorized at dispatchabsentinferred10 of 163
gh#83: tier with no allowlist entry is unrestrictedabsentinferred10 of 163
mcp.bash.timeout_seconds reaches the dispatched bash serverabsentinferred10 of 163
process_single_call completes with locked_tier setabsentinferred10 of 163
v2.14.0: schema validation enforces declared minimum and maximumabsentinferred10 of 163
v2.14.6: a headless host still dispatches engine directivesabsentinferred10 of 163
gh#158: a delegated child's read satisfies its parent's write — absentinferred10 of 164
gh#158: a session's tool call never resolves inside another absentinferred10 of 164
gh#158: repeated sandbox swaps race nothing a concurrent absentinferred10 of 164
gh#158: two sessions reading and writing through ONE filesystem absentinferred10 of 164
gh#158: two sessions writing todos through ONE entropic server absentinferred10 of 164
gh#168: a PRE_TOOL_CALL hook's modified args reach the toolabsentinferred10 of 164
gh#168: a malformed modification is refused, not half-appliedabsentinferred10 of 164
gh#168: a modification that renames the tool is refusedabsentinferred10 of 164
gh#168: a non-zero return still cancels, modification or notabsentinferred10 of 164
gh#158: clearing the default conversation releases the default absentinferred10 of 165
gh#158: each session's todo list is its ownabsentinferred10 of 165
gh#158: ending a session's conversation releases its read absentinferred10 of 165
gh#158: read-before-write is judged per session — another absentinferred10 of 165