fix(agents): recognize the claude-cli-* family in the stream-json dialect gate#80
Merged
Merged
Conversation
…lect gate `isClaudeCliProvider` exact-matched "claude-cli", but the ultracode variant resolves to backend/provider id "claude-cli-ultracode" (and future variants may follow the same "claude-cli-<flavor>" convention). It speaks the same Claude CLI stream-json dialect, yet failed the gate — so `usesClaudeStreamJsonDialect` was false and the JSONL parser silently dropped native text deltas, result frames, and tool events: AskUserQuestion never reached onToolUseStart (no ask_choice card), and assistant text fell back to the raw stream-json blob (the C1 leak). Widen the gate to the claude-cli-* family. Both downstream callers (usesClaudeStreamJsonDialect, shouldUnwrapNestedCliResultText) route through this one helper, so the single change restores text streaming, result unwrap, and tool dispatch for ultracode. Deliberately scoped to this gate only — other `=== "claude-cli"` sites are load-bearing (e.g. claude-live-session keeps ultracode on the one-shot JSONL path) and are tracked in a separate audit. Adds 2 regression tests for the claude-cli-ultracode backend (tool-event dispatch + native text deltas). cli-output.test.ts: 34/34 pass. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
LightDriverCS
marked this pull request as ready for review
June 21, 2026 02:14
LightDriverCS
added a commit
to BenchAGI/homebrew-tap
that referenced
this pull request
Jun 21, 2026
) Bump the openclaw formula bench.1 -> bench.2 so `brew upgrade benchagi/tap/openclaw` ships the ultracode stream-json dialect fix (BenchAGI/openclaw#80, merged to main @40204ac13a). url -> v2026.6.8-bench.2 tag tarball; sha256 -> 85301c98... (independently re-verified from the pushed tag tarball). Co-authored-by: Cory Shelton <[email protected]> Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
Agent-Aurelius
pushed a commit
that referenced
this pull request
Jul 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Widen
isClaudeCliProvider(src/agents/cli-output.ts) from an exact=== "claude-cli"match to theclaude-cli-*family, so the ultracode backend (claude-cli-ultracode) passes the stream-json dialect gate.Why
The ultracode variant resolves to provider/backend id
claude-cli-ultracodeand never setsjsonlDialect. With the exact match,usesClaudeStreamJsonDialectreturnedfalsefor it, socreateCliJsonlStreamingParsersilently dropped:AskUserQuestionnever reachedonToolUseStart, soask_choicechoice-cards never fired.Both downstream consumers —
usesClaudeStreamJsonDialectandshouldUnwrapNestedCliResultText— route through this one helper, so widening it restores text streaming, result unwrap, and tool dispatch for ultracode in a single change.Scope — read before extending
Deliberately limited to this one gate. There are ~20 other
=== "claude-cli"sites in the gateway and some are load-bearing — e.g.claude-live-session.tsexact-matches to keep ultracode on the one-shot JSONL path; family-matching it would reintroduce the C1 leak. Those are tracked in a separate per-site audit (one-vaulthandoffs/gateway-ultracode-family-match-audit-2026-06-20.md), not here.Handoff (Anvil)
src/agents/cli-output.ts(1 helper, +9/−1) andsrc/agents/cli-output.test.ts(+96, 2 regression tests). No other files.cli-output.test.ts34/34 pass (vitest, incl. the 2 newclaude-cli-ultracodecases); pre-commit lint hook passed on both files. Full-repo typecheck/lint left to CI.console-v2-mini1-deploy-2026-06-20.md).BenchAGI/homebrew-tap/Formula/openclaw.rbso customers on ultracode receive the fix; (2) the separate ~20-site family-match audit.Kept draft for Anvil per the PR-readiness contract.
🤖 Generated with Claude Code