Description
debug_dump/mod.rs (around lines 622-629) serializes the outbound LLM request, sourced from unstripped self.msg.messages, including any MessagePart::Image — writing raw base64 image bytes to the debug dump file on disk. Found during review of #6239 (P1 ephemeral persistence strip for MCP image passthrough).
This is correctly out of scope for #6239/spec-072 §4 C1 — debug dumps are opt-in, off by default, and dumping the exact wire payload (including images) is the feature's stated purpose (compare to spec-072's invariant C4, which concerns logs/panics, not deliberately-enabled debug dumps). Filing as a standalone awareness/hardening item, not a spec-072 violation.
Reproduction Steps
- Enable debug dumps (raw format) per
.local/testing conventions.
- Send a message containing an image (existing user-upload path).
- Inspect the debug dump file — expect the full base64-encoded image payload present in the dumped request JSON.
Expected Behavior
Open question for triage: either (a) accept as intended behavior (debug dumps are explicitly for wire-payload debugging and require opt-in), documented explicitly in the debug-dump docs/CLAUDE.md, or (b) redact/truncate large binary Image payloads by default with a separate opt-in flag to include full bytes.
Actual Behavior
Full base64 image bytes are written to the debug dump file whenever debug dumps are enabled and an image is present in the request.
Environment
Related
Suggested next step
Triage: confirm whether this is intended behavior (opt-in debug tooling) or needs redaction. If redaction is chosen, a small follow-up PR truncating/omitting MessagePart::Image base64 payloads in the debug-dump serializer, with a size marker instead.
Description
debug_dump/mod.rs(around lines 622-629) serializes the outbound LLM request, sourced from unstrippedself.msg.messages, including anyMessagePart::Image— writing raw base64 image bytes to the debug dump file on disk. Found during review of #6239 (P1 ephemeral persistence strip for MCP image passthrough).This is correctly out of scope for #6239/spec-072 §4 C1 — debug dumps are opt-in, off by default, and dumping the exact wire payload (including images) is the feature's stated purpose (compare to spec-072's invariant C4, which concerns logs/panics, not deliberately-enabled debug dumps). Filing as a standalone awareness/hardening item, not a spec-072 violation.
Reproduction Steps
.local/testingconventions.Expected Behavior
Open question for triage: either (a) accept as intended behavior (debug dumps are explicitly for wire-payload debugging and require opt-in), documented explicitly in the debug-dump docs/CLAUDE.md, or (b) redact/truncate large binary
Imagepayloads by default with a separate opt-in flag to include full bytes.Actual Behavior
Full base64 image bytes are written to the debug dump file whenever debug dumps are enabled and an image is present in the request.
Environment
Related
specs/072-multimodal-mcp-passthrough/spec.md§4Suggested next step
Triage: confirm whether this is intended behavior (opt-in debug tooling) or needs redaction. If redaction is chosen, a small follow-up PR truncating/omitting
MessagePart::Imagebase64 payloads in the debug-dump serializer, with a size marker instead.