---
name: Psyche resume/final logs are plain text by design
description: Don't add --output-format json to claude -p --resume in src/live/wrapper/claude.rs — fix at extract_claude_response instead
type: feedback
originSessionId: e56799ac-8889-44ce-9bfd-d2f3a2485808
---
In `src/live/wrapper/claude.rs`, `init_session` passes `--output-format json`
but `resume_session`, `resume_session_checked`, and `final_session` deliberately
do NOT. The user chose this asymmetry so the wrapper log blocks (`>>>` body
lines) stay human-readable instead of dumping JSON.

**Why:** Log readability is a stated design goal for the live agent wrapper —
the Psyche log is read by humans during debugging.

**How to apply:** If the wrapper isn't surfacing assistant text from a resume
or final invocation, fix the extractor (`extract_claude_response`) to handle
whatever shape claude CLI emits (plain text, stream-json JSONL, whole-JSON),
plus capture stderr — do NOT add `--output-format json` to the resume args.
The 2026-04-15 fix (commit e7d55e5) shipped exactly that: stream-json
aggregation in the extractor, stderr piping in all three resume sites, and an
`(empty)` marker in `log_block` to make silent omissions impossible.
