Skip to content

feat: add streaming support for Claude Code CLI provider#6833

Open
rabi wants to merge 1 commit intoblock:mainfrom
rabi:6694
Open

feat: add streaming support for Claude Code CLI provider#6833
rabi wants to merge 1 commit intoblock:mainfrom
rabi:6694

Conversation

@rabi
Copy link
Contributor

@rabi rabi commented Jan 30, 2026

Summary

Implement stream() method using Claude CLI's --output-format stream-json and --include-partial-messages flags for incremental text output. Parse NDJSON events (content_block_delta, message_start, message_delta, result) to yield text chunks and usage information.

Type of Change

  • Feature
  • Bug fix
  • Refactor / Code quality
  • Performance improvement
  • Documentation
  • Tests
  • Security fix
  • Build / Release
  • Other (specify below)

AI Assistance

  • This PR was created or reviewed with AI assistance

Testing

Unit tests for parsing steaming events and tested locally.

Closes: #6694

@rabi rabi changed the title Add streaming support for Claude Code CLI provider feat: add streaming support for Claude Code CLI provider Jan 30, 2026
@rabi rabi force-pushed the 6694 branch 2 times, most recently from d8be333 to ad5b039 Compare January 30, 2026 07:26
Implement stream() method using Claude CLI's --output-format stream-json
and --include-partial-messages flags for incremental text output. Parse
NDJSON events (content_block_delta, message_start, message_delta, result)
to yield text chunks and usage information.

Signed-off-by: rabi <ramishra@redhat.com>
@rabi
Copy link
Contributor Author

rabi commented Feb 6, 2026

@jamadeo Hey! it's probably the last one in the series of streaming support. PTAL when possible.

@rabi
Copy link
Contributor Author

rabi commented Feb 7, 2026

Hmm. I've to now rewrite the streaming implementation fresh as we moved to persistent child process that stays alive across turns vs spawning a fresh claude CLI process per request in #7029 that merged quickly.

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.

Stream output of Claude Code CLI provider

1 participant