Bug Report: Task Tool Returns Raw JSONL Session Logs Instead of Clean Output
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Actual Behavior
Task output displays the entire raw JSONL session transcript (~80KB):
Task Output a4d7359 {"parentUuid":"d25655db-ccd7-40b8-b3aa-4c585a9829c0","isSidechain":true,"userType":"external","cwd":"/home/louranicas/claude-code-workspace/the_maintenance_engine","sessionId":"1f55a80a-a3dd-4050-b231-1b7b40d24240","version":"2.1.23","gitBranch":"","agentId":"a4d7359","slug":"snuggly-marinating-dawn","message":{"model":"claude-opus-4-5-20251101","id":"msg_01Uk9hzZpzJ3LNV8jL1eqngg","type":"message","role":"assistant","content":[{"type":"text","text":"\n\nI'll start by reading the relevant files to understand the existing formats and content."}],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":3,"cache_creation_input_tokens":5028,"cache_read_input_tokens":17563... [continues for 80KB+]
What Should Happen?
Expected Behavior
Task output should display only the final assistant summary:
Task Output a4d7359 All three changes are complete and verified. Here is a summary of what was done: - Task 1: L7 Benchmarks added to BENCHMARK_SPEC.md (GAP-009) - Task 2: Created config/observer.toml (GAP-012) - Task 3: Security Considerations added to OBSERVER_LAYER_SPEC.md (GAP-013)
Error Messages/Logs
Additional Context
Session ID: 1f55a80a-a3dd-4050-b231-1b7b40d24240
Agent ID: a4d7359 (slug: snuggly-marinating-dawn)
The agent completed successfully - all 3 tasks were done correctly
The issue is purely in how the output is rendered back to the user
Steps to Reproduce
claude-code-jsonl-bug-report.md
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
Claude Code Version: 2.1.23
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Other
Additional Information
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗