Skip to content

suppress claude CLI unrecognized-model telemetry from reviewer stderr - #6239

Merged
atomantic merged 1 commit into
mainfrom
cos/task-mtn6bzjp/agent-b7b7c1a9
Sep 4, 2026
Merged

suppress claude CLI unrecognized-model telemetry from reviewer stderr#6239
atomantic merged 1 commit into
mainfrom
cos/task-mtn6bzjp/agent-b7b7c1a9

Conversation

@atomantic

Copy link
Copy Markdown
Owner

Summary

  • Stage-2 reviewers using the claude-ollama / claude-ollama-tui providers show [claude-code:unrecognized_model] {"model":"gemma3:27b",...} in their stderr tail. This is the real Anthropic claude CLI's own SDK telemetry, logged once per model whenever it doesn't recognize the model field — expected here because those providers redirect the binary's ANTHROPIC_BASE_URL at a local Ollama endpoint serving non-Anthropic models. It's harmless but confusing, since it names "claude-code" while running under an Ollama-backed review stage.
  • Added server/lib/cliStderrNoise.js (isKnownCliStderrNoise) and wired it into both places stderr is tagged and surfaced for CoS agent runs: server/services/agentCliSpawning.js and server/cos-runner/index.js.

Test plan

  • server/lib/cliStderrNoise.test.js (new) — unit tests for the predicate
  • server/services/agentCliSpawning.test.js — added a behavioral test confirming the noise line is dropped from the surfaced output tail
  • server/cos-runner/index.test.js — updated the parity assertion for the new guard
  • Ran the full set of affected suites locally: services/agentCliSpawning.test.js cos-runner/index.test.js lib/cliStderrNoise.test.js lib/index.test.js — 90 passed

…e-2 reviewer stderr

The claude-ollama / claude-ollama-tui providers redirect the real Anthropic
claude binary's ANTHROPIC_BASE_URL at a local Ollama endpoint serving models
like gemma3:27b. The binary's own SDK doesn't recognize those model names and
logs a one-time-per-model `[claude-code:unrecognized_model]` warning to
stderr — harmless telemetry, but confusing in reviewer output since it names
"claude-code" while running under an Ollama-backed OpenCode/claude-ollama
review stage. Filter it out at both places stderr is tagged and surfaced
(agentCliSpawning.js and cos-runner/index.js).
@atomantic
atomantic enabled auto-merge September 4, 2026 16:48
@atomantic
atomantic merged commit a7ebe7a into main Sep 4, 2026
7 checks passed
@atomantic
atomantic deleted the cos/task-mtn6bzjp/agent-b7b7c1a9 branch September 4, 2026 16:50
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