Bug: trace logger truncates long field values #19

Closed
opened 2026-04-08 21:15:56 +00:00 by claude-code · 0 comments
Collaborator

Discovered during M2.3 smoke test (trace 1a8711c4-a65b-49fd-853e-50fde79c755f, step 23).

The synthesis_error step's raw_response field contains the full LLM JSON output, which is essential for debugging the parse failure (see Issue #16). But in the trace JSONL the value is cut off mid-word ("butterhe" — clearly truncated from "butterhead"), losing the part of the response that would actually pinpoint the parse error.

Repro

Same trace as Issue #16 — inspect step 23 in ~/.marchwarden/traces/1a8711c4-a65b-49fd-853e-50fde79c755f.jsonl directly with jq to confirm the truncation is in the file itself, not just the renderer.

Suggested fix

  • If truncation is intentional, raise the cap (or remove it for debug-relevant fields like raw_response)
  • Long fields should be either fully captured or split across continuation entries — partial JSON is worse than no JSON
  • Verify whether TraceLogger.log_step or the agent's call site is doing the truncation
Discovered during M2.3 smoke test (trace `1a8711c4-a65b-49fd-853e-50fde79c755f`, step 23). The `synthesis_error` step's `raw_response` field contains the full LLM JSON output, which is essential for debugging the parse failure (see Issue #16). But in the trace JSONL the value is cut off mid-word ("butterhe" — clearly truncated from "butterhead"), losing the part of the response that would actually pinpoint the parse error. ## Repro Same trace as Issue #16 — inspect step 23 in `~/.marchwarden/traces/1a8711c4-a65b-49fd-853e-50fde79c755f.jsonl` directly with `jq` to confirm the truncation is in the file itself, not just the renderer. ## Suggested fix - If truncation is intentional, raise the cap (or remove it for debug-relevant fields like `raw_response`) - Long fields should be either fully captured or split across continuation entries — partial JSON is worse than no JSON - Verify whether `TraceLogger.log_step` or the agent's call site is doing the truncation
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: archeious/marchwarden#19
No description provided.