Skip to content

[codex] fix Cline auth and Claude stream blocks - #188

Merged
LeenHawk merged 1 commit into
mainfrom
codex/fix-cline-claude-stream
Aug 16, 2026
Merged

[codex] fix Cline auth and Claude stream blocks#188
LeenHawk merged 1 commit into
mainfrom
codex/fix-cline-claude-stream

Conversation

@LeenHawk

Copy link
Copy Markdown
Owner

What changed

  • Classify Cline credentials as API keys instead of OAuth tokens, matching OpenCode Go/Zen behavior.
  • Mirror the Cline device token into api_key and migrate existing Cline oauth_tokens credentials.
  • Give Claude-compatible thinking and text blocks distinct sequential indexes and emit matched block-stop events.
  • Add Rust and Console regression coverage.

Why

Cline API keys were incorrectly routed through the OAuth refresh path, even though they do not require a refresh token. Separately, Claude-compatible streams reused content block index 0 when transitioning from thinking to text, which could make the VS Code Claude plugin report content_block_delta mismatched and stop after the thinking block.

Impact

Existing Cline credentials are migrated automatically. Claude-compatible streaming clients now receive a valid content-block lifecycle across thinking and text output.

Validation

  • gproxy: 798 tests passed
  • gproxy-transform: 101 tests passed
  • Console channel-meta.test.ts: 9 tests passed
  • Streaming probe verified thinking index 0, text index 1, paired stops, and message_stop

@LeenHawk
LeenHawk merged commit 2d77732 into main Aug 16, 2026
7 checks passed
@LeenHawk
LeenHawk deployed to cloudflare August 16, 2026 16:21 — with GitHub Actions Active
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 participant