Skip to content

[anthropic-vertex] route=native in 2026.6.10 causes non-visible-output for pure text responses (regression from proxy-like in 2026.6.8) #96337

Closed as not planned

Description

@danieljimz

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 from 2026.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_status tool, 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

  1. Investigate the route=native streaming text parser for anthropic-vertex in 2026.6.10
  2. If a config option to force route=proxy-like is feasible, please expose it
  3. Consider a patch release (2026.6.11) to restore route=proxy-like as the default for api: "anthropic-messages" until the native path is stable

Activity

  1. clawsweeper commented on Jun 24, 2026

    @clawsweeper
    Contributor

    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

    • Add a screenshot or short recording showing the behavior.
    • Add expected vs actual behavior.

    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:

    • A live Vertex reproduction was not run because this review does not have the reporter's GCP Anthropic Vertex credentials.
    • The exact fix shape still needs owner judgment: adapt the native Vertex stream, use the SDK stream abstraction, or temporarily route through the OpenClaw-managed transport.

    Codex review notes: model internal, reasoning high; reviewed against a2725b6a24c8.

    Label changes

    Label changes:

    • add P1: This is a latest-release regression that can break real channel turns for users of the Anthropic Vertex provider.
    • add impact:message-loss: The reported failure drops pure model text before it becomes visible in Google Chat.
    • add impact:auth-provider: The issue is rooted in provider routing and the Anthropic Vertex native transport path.
    • add issue-rating: 🐚 platinum hermit: Current issue advisory state selects this label.
    • add clawsweeper:needs-live-repro: Current issue advisory state selects this label.
    • add clawsweeper:no-new-fix-pr: Current issue advisory state selects this label.
    • add clawsweeper:needs-maintainer-review: Current issue advisory state selects this label.
    • add 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:

    • Repository policy read: Root and scoped provider/SDK review policies were read; provider routing and dependency-backed behavior require source and dependency inspection before verdict. (AGENTS.md:1, a2725b6a24c8)
    • Provider stream boundary: The Anthropic Vertex plugin creates an AnthropicVertex client and passes it to streamAnthropic; the plugin does not currently adapt Vertex-specific streaming events before the shared parser. (extensions/anthropic-vertex/stream-runtime.ts:125, a2725b6a24c8)
    • Shared Anthropic parser contract: The shared Anthropic stream path reads the raw Response from 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)
    • Observed error path exists: The embedded runner emits the exact non-visible-output retry warning when a provider error has no visible assistant output. (src/agents/embedded-agent-runner/run.ts:3307, a2725b6a24c8)
    • Pinned dependency contract: The bundled Anthropic Vertex plugin in v2026.6.10 pins @anthropic-ai/vertex-sdk 0.16.1 and @anthropic-ai/sdk 0.100.1. (extensions/anthropic-vertex/npm-shrinkwrap.json:3, a2725b6a24c8)
    • Vertex SDK stream route: The pinned Vertex SDK rewrites streaming /v1/messages requests to the Vertex streamRawPredict method, making the raw response format an important contract for the shared parser.

    Likely related people:

    • sallyom: Authored and merged the PR that added the Anthropic Vertex provider and original stream injection seam. (role: feature introducer; confidence: medium; commits: 20c854521a39; files: src/agents/anthropic-vertex-stream.ts, extensions/anthropic-vertex/provider-catalog.ts)
    • vincentkoc: Authored and merged the PR that moved the Anthropic Vertex SDK runtime into the plugin, including the current stream runtime file. (role: runtime refactor author; confidence: high; commits: c6409917c796, 6b908093c4ea, bacdf11059bb; files: extensions/anthropic-vertex/stream-runtime.ts, extensions/anthropic-vertex/api.ts)
    • steipete: Authored a large merged Anthropic/Fable provider update touching Anthropic Vertex runtime, shared Anthropic transport, and provider model contracts. (role: recent adjacent Anthropic contributor; confidence: high; commits: 63b81ac0950f, 73bc4e7b5279, 9b695ca8be1e; files: extensions/anthropic-vertex/stream-runtime.ts, src/llm/providers/anthropic.ts, src/agents/anthropic-transport-stream.ts)
    • openperf: Authored the merged Anthropic Vertex cache_control fix that recently touched the provider stream runtime before v2026.6.10. (role: recent area contributor; confidence: medium; commits: 6ef19602bfb4; files: extensions/anthropic-vertex/stream-runtime.ts, extensions/anthropic-vertex/stream-runtime.test.ts)
    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
    • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
  2. added
    P1High-priority user-facing bug, regression, or broken workflow.
    impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.
    impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.
    issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.
    clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.
    clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.
    clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.
    clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.
    on Jun 24, 2026
  3. danieljimz commented on Jun 24, 2026

    @danieljimz
    Author

    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

    • OpenClaw: 2026.6.10 (commit aa69b12)
    • Provider config: api: "anthropic-messages", baseUrl: "https://aiplatform.googleapis.com"
    • Auth: Service account key JSON copied to ~/.config/gcloud/application_default_credentials.json (type: service_account) — credential type is JWT/RSA, not user OAuth
    • Models tested: claude-haiku-4-5, claude-sonnet-4-6
    • Plugin versions (from npm-shrinkwrap.json): @anthropic-ai/vertex-sdk@0.16.1, @anthropic-ai/sdk@0.100.1

    Expected vs Actual

    Behaviour 2026.6.8 (route=proxy-like) 2026.6.10 (route=native)
    Pure text response ✅ Streams and delivers ❌ stopReason=error non-visible-output
    Tool call as first response ✅ Works ✅ Works
    Text response after a tool result ✅ Works ✅ Works
    Response time on failure n/a ~2s (fast failure, not timeout)
    [model-fetch] log entry Present (OpenClaw transport) Absent — SDK's own fetch, not OpenClaw's transport layer

    Confirming the asResponse() path

    A crucial observable fact: Gemini calls produce [model-fetch] start/response logs; anthropic-vertex calls produce none at all:

    # Gemini (active-memory, working)
    [debug] provider-transport-fetch [model-fetch] start  provider=google api=google-generative-ai model=gemini-3.5-flash method=POST url=https://generativelanguage.googleapis.com/...
    [debug] provider-transport-fetch [model-fetch] response provider=google status=200 elapsedMs=1758 contentType=text/event-stream
    
    # Claude via anthropic-vertex (failing)
    [debug] embedded run agent start: runId=d951be70
    [warn]  gateway/channels/googlechat embedded run agent end          ← no [model-fetch] logs, no tool calls
    [warn]  agent/embedded [empty-error-retry] stopReason=error non-visible-output; resubmitting attempt=1/3
    

    This confirms the request goes through @anthropic-ai/vertex-sdk's own fetch (the .asResponse() path in anthropic.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 by iterateAnthropicEvents.


    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:

    # Attempt 1/3: model returned text → non-visible-output (2s)
    [warn] embedded run agent end
    [warn] [empty-error-retry] stopReason=error non-visible-output; attempt=1/3
    
    # Attempt 2/3: model returned text → non-visible-output (2s)
    [warn] embedded run agent end
    [warn] [empty-error-retry] stopReason=error non-visible-output; attempt=2/3
    
    # Attempt 3/3: model called session_status tool first → SUCCESS
    [debug] embedded run tool start: tool=session_status toolCallId=toolu_vrtx_01QuRrWKSf7ZumY1FZTLNhyz
    [debug] embedded run tool end:   tool=session_status
    [debug] embedded run agent end:  isError=false   ← success
    

    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:

    "The pinned Vertex SDK rewrites streaming /v1/messages requests to the Vertex streamRawPredict method, making the raw response format an important contract for the shared parser."

    iterateAnthropicEvents in anthropic.ts:404 reads the raw Response from .asResponse() and filters for ANTHROPIC_MESSAGE_EVENTS:

    const ANTHROPIC_MESSAGE_EVENTS: ReadonlySet<string> = new Set([
      "message_start", "message_delta", "message_stop",
      "content_block_start", "content_block_delta", "content_block_stop",
    ]);

    If streamRawPredict wraps the events in a Vertex-specific envelope (e.g., JSON array, different event names, or a data: line format that differs from the standard Anthropic SSE wire protocol), the filter at anthropic.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_delta events 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 how streamRawPredict serialises 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 the non-visible-output condition (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.completed events with the raw messagesSnapshot including any errorMessage fields. Let us know.


    Suggested diagnostic addition to stream-runtime.ts

    If 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 .body is null before passing to iterateAnthropicEvents would immediately confirm whether the format mismatch hypothesis is correct.

  4. danieljimz commented on Jun 26, 2026

    @danieljimz
    Author

    @clawsweeper Do you need any other details or more info?

  5. openclaw-barnacle commented on Jul 11, 2026

    @openclaw-barnacle

    This issue has been automatically marked as stale due to inactivity.
    Please add updates or it will be closed.

  6. openclaw-barnacle commented on Jul 19, 2026

    @openclaw-barnacle

    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.

  7. locked as resolved and limited conversation to collaborators on Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority user-facing bug, regression, or broken workflow.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.staleMarked as stale due to inactivity

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions