Skip to content

Stream Claude CLI events live in OpenAPI sync workflow log - #117

Merged
linhcrl merged 1 commit into
cockroachdb:mainfrom
linhcrl:stream-claude-events
Jun 30, 2026
Merged

Stream Claude CLI events live in OpenAPI sync workflow log#117
linhcrl merged 1 commit into
cockroachdb:mainfrom
linhcrl:stream-claude-events

Conversation

@linhcrl

@linhcrl linhcrl commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Switch the Claude CLI from --output-format json to stream-json so it emits one JSON event per turn instead of buffering a single object at the end, and pipe through tee so Claude's events stream to the GitHub Actions log live while still being captured to the output file. Wrap the stream in a ::group:: section so the per-turn JSON collapses in the workflow UI.

Update the jq extractor to select the final type:"result" event from the Claude output since the captured file is now newline-delimited events instead of one object.

Switch the Claude CLI from --output-format json to stream-json so it
emits one JSON event per turn instead of buffering a single object at
the end, and pipe through tee so Claude's events stream to the GitHub
Actions log live while still being captured to the output file. Wrap
the stream in a ::group:: section so the per-turn JSON collapses in
the workflow UI.

Update the jq extractor to select the final type:"result" event from
the Claude output since the captured file is now newline-delimited
events instead of one object.

Co-Authored-By: roachdev-claude <roachdev-claude-bot@cockroachlabs.com>
@linhcrl
linhcrl requested a review from fantapop June 25, 2026 05:31

@fantapop fantapop left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@linhcrl
linhcrl merged commit 5d9fd1c into cockroachdb:main Jun 30, 2026
2 checks passed
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.

2 participants