You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(mcp): a denied chat_with_agent / fan_out call is audited as a successful tool call #2807
Every MCP tool is wrapped by withAudit (src/mcp-server/src/server.ts), which sets details.success by whether the tool threw (src/mcp-server/src/audit.ts). The checkAgentAccess denials in src/mcp-server/src/tools/chat.ts return a JSON string ({"error": "Access denied", "reason": …}) instead of throwing, so the audit row for a refused agent-to-agent call says success: true and carries no denial marker. An operator reading the audit log cannot tell a permitted call from a refused one.
Context
Found while building the J10 journey harness (#2349): its "the denial is observable" criterion holds for the caller (the tool result says why) but not for the operator. The harness asserts today that the row exists, and carries the denial marker as a strict=True xfail.
Acceptance Criteria
A checkAgentAccess denial in chat_with_agent, the dedicated chat_with_<slug> tools and fan_out produces an audit row with details.success == false (or an explicit denied: true plus the reason), without changing the JSON the caller receives — agents parse it
Flip condition for the J10 xfail: test_the_operator_can_see_that_a_call_was_refused passes and the marker is removed in the same PR
Technical Notes
Smallest shape: the deny branch records the audit outcome itself (success=false, reason) before returning, or throws an error the wrapper classifies while a thin catch preserves the caller-visible JSON.
Landed on dev as 6c7e3d27c (PR #2855, squash-merged 2026-09-17 13:18Z); Deploy to Dev green on that SHA at 13:18:40Z, so the dev instance now records a refused tool call as success: false, denied: true, error: <reason>. The J10 journey asserts it on every PR. Closes at the next release cut. Follow-ups registered in the trinity-dev debt inbox: returned non-denial failures still audit as success; id-addressed tools leave target_id empty; refusals are not listable through the audit-log filters. Side finding filed as #2856 (a worker-history flake in test_2638).
Activity
feat(tests): J10 journey — agents call each other through the MCP ser…
webmixgamer commentedon Sep 16, 2026
/claim
github-actions commentedon Sep 16, 2026
Claimed by @webmixgamer. Label
status-in-progressadded.Next steps:
feature/2807-<short-slug>Fixes #2807fix(mcp): a denied tool call is audited as a refusal, not a success (#…
webmixgamer commentedon Sep 17, 2026
Landed on
devas6c7e3d27c(PR #2855, squash-merged 2026-09-17 13:18Z);Deploy to Devgreen on that SHA at 13:18:40Z, so the dev instance now records a refused tool call assuccess: false,denied: true,error: <reason>. The J10 journey asserts it on every PR. Closes at the next release cut. Follow-ups registered in the trinity-dev debt inbox: returned non-denial failures still audit as success; id-addressed tools leavetarget_idempty; refusals are not listable through the audit-log filters. Side finding filed as #2856 (a worker-history flake intest_2638).feat(mcp): search_executions — grep the execution corpus via the ente…
test(mcp): each loop-tool call drains and identity-checks its own aud…
refactor(mcp): credential tools are advertised only to the keys the b…
refactor(mcp): credential-migration tools are listed only for the key…
fix(mcp): audit a returned operational failure as a failure, not a su…