Skip to content

Add --output-format stream-json to Claude Code command#24

Closed
juhgiyo wants to merge 1 commit intomainfrom
claude/stream-json-output-format
Closed

Add --output-format stream-json to Claude Code command#24
juhgiyo wants to merge 1 commit intomainfrom
claude/stream-json-output-format

Conversation

@juhgiyo
Copy link
Copy Markdown
Contributor

@juhgiyo juhgiyo commented Mar 23, 2026

Summary

  • Add --output-format stream-json flag to the Claude Code command built by cmdBuild()
  • This enables JSONL output including a final result message with token usage data
  • Prerequisite for cost tracking in StrawPot sessions

Part of strawpot/strawpot#422 (Cost Observability Phase 1).
Closes strawpot/strawpot#423

Test plan

  • New test TestCmdBuild_StreamJsonOutputFormat verifies the flag is present
  • All 16 existing tests pass

🤖 Generated with Claude Code

Enable stream-json output format so Claude Code emits JSONL to stdout,
including a final "result" message with token usage data. This is the
prerequisite for cost tracking in StrawPot sessions.

Part of strawpot#422 (Cost Observability Phase 1).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@juhgiyo
Copy link
Copy Markdown
Contributor Author

juhgiyo commented Mar 24, 2026

Closing — the related cost observability feature (strawpot/strawpot#422–#428) has been closed. Cost observability couples StrawPot to specific agent token/cost formats, which conflicts with supporting any agent type.

@juhgiyo juhgiyo closed this Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1/6: Claude Code wrapper — add --output-format stream-json

1 participant