Summary
One of the remaining gaps under #64046 where message payloads reach disk storage without passing through the standard redaction pipeline.
Scope
Session transcript write paths (appendSessionTranscriptMessage call sites) in core session management, CLI attempt execution, gateway inject, and bundled extension mirror surfaces.
Approach taken
Rather than applying guard infrastructure at each bare entry point, redaction is centralised at the single write layer in appendSessionTranscriptMessage (in src/config/sessions/transcript-append.ts). The four redact helpers previously local to session-tool-result-guard-wrapper.ts are extracted into a new shared module src/agents/transcript-redact.ts and called unconditionally before the JSONL entry is built. This makes redaction always-on regardless of which callsite triggers the write, with a safe fallback to DEFAULT_REDACT_MODE + DEFAULT_REDACT_PATTERNS when no config is provided.
Note: This is a tracking sub-issue scoped to one specific sink family. See #64046 for the full umbrella.
Addressed by #73563.
Summary
One of the remaining gaps under #64046 where message payloads reach disk storage without passing through the standard redaction pipeline.
Scope
Session transcript write paths (
appendSessionTranscriptMessagecall sites) in core session management, CLI attempt execution, gateway inject, and bundled extension mirror surfaces.Approach taken
Rather than applying guard infrastructure at each bare entry point, redaction is centralised at the single write layer in
appendSessionTranscriptMessage(insrc/config/sessions/transcript-append.ts). The four redact helpers previously local tosession-tool-result-guard-wrapper.tsare extracted into a new shared modulesrc/agents/transcript-redact.tsand called unconditionally before the JSONL entry is built. This makes redaction always-on regardless of which callsite triggers the write, with a safe fallback toDEFAULT_REDACT_MODE+DEFAULT_REDACT_PATTERNSwhen no config is provided.