Repository navigation
Description
Summary
In 2026.6.10, the anthropic-vertex provider (with api: "anthropic-messages") changed its routing from route=proxy-like (2026.6.8) to route=native. This change causes all pure text responses from Claude models (tested with claude-haiku-4-5 and claude-sonnet-4-6) to fail with stopReason=error non-visible-output, while tool call responses work correctly.
This is a regression — the same configuration worked reliably in 2026.6.8 with route=proxy-like.
Environment
- OpenClaw version:
2026.6.10(regression from2026.6.8) - Provider:
anthropic-vertex - Models affected:
claude-haiku-4-5,claude-sonnet-4-6(all Claude models via Vertex AI) - Channel:
googlechat - Deployment: Containerized (Docker), GCE VM, Debian 12
- Auth: Service account key set as Application Default Credentials via
~/.config/gcloud/application_default_credentials.json
Provider Configuration
"anthropic-vertex": {
"api": "anthropic-messages",
"baseUrl": "https://aiplatform.googleapis.com",
"models": [
{ "id": "claude-haiku-4-5", "name": "Claude Haiku 4.5" },
{ "id": "claude-sonnet-4-6", "name": "Claude Sonnet 4.6" }
]
}Observed Behavior
Route log difference
| Version | Route log |
|---|---|
| 2026.6.8 | provider=anthropic-vertex api=anthropic-messages endpoint=google-vertex route=proxy-like |
| 2026.6.10 | provider=anthropic-vertex api=anthropic-messages endpoint=google-vertex route=native |
Failure pattern (2026.6.10)
Every attempt where the model returns a pure text response fails immediately (≈2s) with:
[warn] agent/embedded [empty-error-retry] stopReason=error non-visible-output; resubmitting attempt=1/3 provider=anthropic-vertex model=claude-haiku-4-5
[warn] agent/embedded [empty-error-retry] stopReason=error non-visible-output; resubmitting attempt=2/3 provider=anthropic-vertex model=claude-haiku-4-5
[warn] agent/embedded [empty-error-retry] stopReason=error non-visible-output; resubmitting attempt=3/3 provider=anthropic-vertex model=claude-haiku-4-5
The gateway/channels/googlechat log shows only warn: embedded run agent end (no isError=false), and there are no [model-fetch] logs for anthropic-vertex calls (unlike Gemini calls, which log [model-fetch] start/response correctly).
Contrasting behavior: tool call responses succeed
When the model's first response is a tool call (not text), the call succeeds:
[debug] embedded run tool start: tool=session_status toolCallId=toolu_vrtx_01...
[debug] embedded run tool end: tool=session_status toolCallId=toolu_vrtx_01...
[debug] embedded run agent end: runId=... isError=false ← success
The subsequent text response (after the tool result) also succeeds. The failure is specific to the first streaming text chunk path in route=native.
Reproduction Pattern
A session illustrating the deterministic nature of the failure:
Message 1: "what version are you using? and model? and openclaw version?"
- Attempt 1/3 →
non-visible-output(model returned text, ≈2s response) - Attempt 2/3 →
non-visible-output(model returned text, ≈2s response) - Attempt 3/3 → success (model called
session_statustool, then replied with text)
Message 2 (same session, 2.5 min later): "do you have access to gitlab? test it"
- Attempt 1/3 →
non-visible-output(model returned text) - Attempt 2/3 →
non-visible-output(model returned text) - Attempt 3/3 →
non-visible-output(model returned text — no tool call made)
The difference: when the model makes a tool call as its first response, the route=native path succeeds. When it returns a pure text stream, the parser cannot extract visible output.
Relevant Log Excerpt (2026.6.10, failing turn)
[debug] embedded run prompt start: runId=d951be70 provider=anthropic-vertex api=anthropic-messages endpoint=google-vertex route=native policy=none
[debug] [context-diag] pre-prompt: ... provider=anthropic-vertex/claude-haiku-4-5 ...
[debug] gateway/channels/googlechat embedded run agent start: runId=d951be70
[warn] gateway/channels/googlechat embedded run agent end ← no isError=false, no tool calls
[debug] session state: ... new=idle reason="run_completed"
[debug] embedded run prompt end: durationMs=2172 ← completes in ~2s (fast failure)
[warn] agent/embedded [empty-error-retry] stopReason=error non-visible-output; resubmitting attempt=2/3
Compare with 2026.6.8 production (same config, same model, working):
[debug] embedded run prompt start: runId=... provider=anthropic-vertex api=anthropic-messages endpoint=google-vertex route=proxy-like policy=none
[debug] gateway/channels/googlechat embedded run agent end: isError=false ← success
Notes on session file repaired
On each failed attempt, OpenClaw logs:
[debug] agent/embedded session file repaired: rewrote 1 assistant message(s) (<session-id>.jsonl)
This suggests an error assistant message is being written to the session file and then cleaned up before retry. The context grows by 2 messages per failed attempt (failed assistant + injected user retry), but the failure pattern is the same regardless of message count.
Hypothesis
The route=native path in 2026.6.10 streams the Vertex AI Claude response differently from route=proxy-like. The parser that extracts text content from the native streaming format appears to fail for text-only responses (returning empty/unparseable content → non-visible-output), while tool call events in the same stream parse correctly. This is consistent with text blocks and tool use blocks being serialized differently in the Anthropic Vertex native streaming protocol.
Workaround
None known at the config level. The only current workaround is to stay on 2026.6.8 (route=proxy-like, fully functional).
If there is a config key to force route=proxy-like on the anthropic-vertex provider in 2026.6.10, it would be a useful escape hatch — it does not appear in the documented schema.
Request
- Investigate the
route=nativestreaming text parser foranthropic-vertexin 2026.6.10 - If a config option to force
route=proxy-likeis feasible, please expose it - Consider a patch release (2026.6.11) to restore
route=proxy-likeas the default forapi: "anthropic-messages"until the native path is stable
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Jun 24, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 24, 2026, 4:45 AM ET / 08:45 UTC.
Summary
Keep open: current main still uses the Anthropic Vertex SDK client inside the shared Anthropic stream parser, and no post-v2026.6.10 change appears to fix the reported native pure-text stream failure.
Reproducibility: no. a high-confidence live reproduction needs real Google Vertex Anthropic credentials. Source inspection does identify the current stream boundary and retry path that match the reported failure mode.
Ways to help us reproduce this
Next step
The report appears valid and current, but the fix needs provider-owner judgment and live Vertex proof before a safe patch or fallback default can be chosen.
Review details
Best possible solution:
Fix the provider-owned Anthropic Vertex stream path so native Vertex pure-text responses emit normal visible text events, with any fallback/default change treated as a maintainer compatibility decision.
Do we have a high-confidence way to reproduce the issue?
No; a high-confidence live reproduction needs real Google Vertex Anthropic credentials. Source inspection does identify the current stream boundary and retry path that match the reported failure mode.
Is this the best way to solve the issue?
Unclear; the best direction is a provider-stream parser or adapter fix, while restoring proxy-like behavior or adding a config escape hatch needs maintainer compatibility judgment.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning high; reviewed against a2725b6a24c8.
Label changes
Label changes:
P1: This is a latest-release regression that can break real channel turns for users of the Anthropic Vertex provider.impact:message-loss: The reported failure drops pure model text before it becomes visible in Google Chat.impact:auth-provider: The issue is rooted in provider routing and the Anthropic Vertex native transport path.issue-rating: 🐚 platinum hermit: Current issue advisory state selects this label.clawsweeper:needs-live-repro: Current issue advisory state selects this label.clawsweeper:no-new-fix-pr: Current issue advisory state selects this label.clawsweeper:needs-maintainer-review: Current issue advisory state selects this label.clawsweeper:needs-product-decision: Current issue advisory state selects this label.Label justifications:
P1: This is a latest-release regression that can break real channel turns for users of the Anthropic Vertex provider.impact:message-loss: The reported failure drops pure model text before it becomes visible in Google Chat.impact:auth-provider: The issue is rooted in provider routing and the Anthropic Vertex native transport path.Evidence reviewed
What I checked:
AGENTS.md:1, a2725b6a24c8)AnthropicVertexclient and passes it tostreamAnthropic; the plugin does not currently adapt Vertex-specific streaming events before the shared parser. (extensions/anthropic-vertex/stream-runtime.ts:125, a2725b6a24c8)client.messages.create(..., stream: true).asResponse()and only processes Anthropic SSE event names before emitting text/tool events. (src/llm/providers/anthropic.ts:404, a2725b6a24c8)non-visible-outputretry warning when a provider error has no visible assistant output. (src/agents/embedded-agent-runner/run.ts:3307, a2725b6a24c8)@anthropic-ai/vertex-sdk0.16.1 and@anthropic-ai/sdk0.100.1. (extensions/anthropic-vertex/npm-shrinkwrap.json:3, a2725b6a24c8)/v1/messagesrequests to the VertexstreamRawPredictmethod, making the raw response format an important contract for the shared parser.Likely related people:
src/agents/anthropic-vertex-stream.ts,extensions/anthropic-vertex/provider-catalog.ts)extensions/anthropic-vertex/stream-runtime.ts,extensions/anthropic-vertex/api.ts)extensions/anthropic-vertex/stream-runtime.ts,src/llm/providers/anthropic.ts,src/agents/anthropic-transport-stream.ts)extensions/anthropic-vertex/stream-runtime.ts,extensions/anthropic-vertex/stream-runtime.test.ts)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.danieljimz commentedon Jun 24, 2026
Additional Evidence
Thanks for the detailed source review. Here is the live runtime evidence from our deployment, which aligns with the source findings and may help narrow down the fix.
Setup
2026.6.10(commitaa69b12)api: "anthropic-messages",baseUrl: "https://aiplatform.googleapis.com"~/.config/gcloud/application_default_credentials.json(type:service_account) — credential type is JWT/RSA, not user OAuthclaude-haiku-4-5,claude-sonnet-4-6npm-shrinkwrap.json):@anthropic-ai/vertex-sdk@0.16.1,@anthropic-ai/sdk@0.100.1Expected vs Actual
route=proxy-like)route=native)stopReason=error non-visible-output[model-fetch]log entryConfirming the
asResponse()pathA crucial observable fact: Gemini calls produce
[model-fetch] start/responselogs; anthropic-vertex calls produce none at all:This confirms the request goes through
@anthropic-ai/vertex-sdk's own fetch (the.asResponse()path inanthropic.ts:529), bypassing OpenClaw's transport logging entirely. The SDK is reaching Vertex and getting a response (2s is too fast for a timeout) — but whatever comes back cannot be parsed as visible text byiterateAnthropicEvents.The tool-call success path
In one instance, attempt 3 of a call succeeded because the model chose to call a tool first (
session_status), rather than responding with plain text:By attempt 3 the session had grown to 13 messages (accumulated failed assistant messages + injected user retries from
session file repaired), which caused the model to reach for a tool instead of replying directly.The follow-up text response (after the tool result) also succeeded — consistent with the issue being in the first streaming read of a pure-text response body from the native Vertex path.
Hypothesis linking to source findings
Your review identified that:
iterateAnthropicEventsinanthropic.ts:404reads the rawResponsefrom.asResponse()and filters forANTHROPIC_MESSAGE_EVENTS:If
streamRawPredictwraps the events in a Vertex-specific envelope (e.g., JSON array, different event names, or adata:line format that differs from the standard Anthropic SSE wire protocol), the filter atanthropic.ts:421(if (!ANTHROPIC_MESSAGE_EVENTS.has(sse.event ?? "")) { continue; }) would silently skip all events → empty output →non-visible-output.Why tool calls succeed:
content_block_start/content_block_deltaevents for tool input JSON are the same event types as for text. If the issue is purely at the SSE envelope level, both should fail equally. This suggests the difference may instead be in howstreamRawPredictserialises text-only vs tool-use responses, OR that for tool calls the model returns a response long enough to have a different streaming chunking pattern that avoids whatever parsing edge case affects short pure-text responses.Session file evidence
On every failed attempt,
session file repaired: rewrote 1 assistant message(s)is logged, confirming an assistant message with empty/null content was written and then cleaned up. The content array for these messages is presumably empty — no text blocks, no tool calls, no error text — which is thenon-visible-outputcondition (run.ts:3307).What we cannot provide
A minimal standalone repro script (credentials). We can share sanitised raw trajectory JSONL from the session files if that helps — they contain the
model.completedevents with the rawmessagesSnapshotincluding anyerrorMessagefields. Let us know.Suggested diagnostic addition to
stream-runtime.tsIf a quick logging probe is feasible for a patch build: logging the raw response
Content-Type, the first 500 bytes of the body, and whether.bodyis null before passing toiterateAnthropicEventswould immediately confirm whether the format mismatch hypothesis is correct.danieljimz commentedon Jun 26, 2026
@clawsweeper Do you need any other details or more info?
openclaw-barnacle commentedon Jul 11, 2026
This issue has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.
openclaw-barnacle commentedon Jul 19, 2026
Closing due to inactivity.
If this is still an issue, please retry on the latest OpenClaw release and share updated details.
If you are absolutely sure it still happens on the latest release, open a new issue with fresh steps to reproduce.