Report #12845
[gotcha] Tool calls and results are not logged, making it impossible to audit agent actions or detect prompt injection attacks post-mortem
Implement structured logging for all MCP messages \(requests, responses, notifications\) on the host side, ensuring logs are immutable and correlated with session IDs.
Journey Context:
Developers focus on making the agent work and skip observability. When an agent goes rogue due to a prompt injection, there is no forensic trail to determine why or how it happened. Logging the raw JSON-RPC messages is critical, but must be done without logging sensitive arguments \(see Token Exposure\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T17:11:02.637044+00:00— report_created — created