Skip to content

Bug: preserve Anthropic thinking replay through proxy-auth translation and clarify prompt-cache behavior #3719

Description

@lidge-jun

Client or integration

Claude Code

Also reported with Claude Desktop 3P against a remote OpenCodex hub, using a connected client's proxy admission credential.

Area

Proxy and routing

Summary

Separate follow-up for the thinking/replay and prompt-cache request in #3646. This issue applies when Anthropic is the intended upstream. It does not cover Desktop date/hash alias discovery, hub registry ownership, client profile apply, or rejection of unresolved managed aliases; those belong to the remote-alias slice of #3646. Landing that slice does not establish that this replay/cache request is resolved.

The reporter asks that assistant thinking and redacted_thinking blocks survive subsequent turns to the intended Anthropic route, or that a supported untranslated path preserve the original Anthropic exchange. The guide should also explain how proxy authentication, native passthrough eligibility, and prompt-cache retention differ.

Evidence and limits:

  • The current inbound translator explicitly drops assistant thinking and redacted_thinking blocks on replay (src/claude/inbound.ts, assistant-content conversion). The Claude Code guide documents this policy.
  • Native passthrough requires an eligible unchanged Anthropic model and an actual Anthropic credential; a hub admission token by itself is not that credential. An exposed listener also requires the dedicated proxy admission header. Proxy-auth translation and native passthrough are different routes.
  • Translation does not mean prompt caching is disabled. The Anthropic adapter still applies prompt-cache controls, including automatic caching for the native Anthropic endpoint. cacheRetention supports short (default, five minutes), long (one hour), and none.
  • Bug: remote-hub Claude Desktop date aliases are forwarded to Anthropic as Opus (quota burn + cache miss) #3646 reports repeated cache misses and faster quota consumption after thinking responses. Neither a per-turn miss guarantee nor its causal attribution to dropped replay blocks has been reproduced in this follow-up. The report's claim that native Claude typically uses one-hour breakpoints also needs a controlled comparison. Do not infer billing or quota savings from the alias fix or from the configured retention duration alone.

Expected outcome:

  • Define and implement supported Anthropic-to-Anthropic replay fidelity for proxy-auth traffic, preserving upstream-issued thinking signatures and opaque redacted-thinking blocks where the upstream/client contract requires them. Do not manufacture signatures or forward provider-specific blocks to unrelated providers.
  • Verify a multi-turn thinking/tool-result exchange through the intended Anthropic route, including both block types, without replay validation errors or silently dropping required blocks.
  • Compare cache creation/read usage across controlled continuation turns with stable model, credential scope, prompt prefix, tools, and retention settings. Distinguish replay changes from TTL expiry and other cache eligibility rules; record unexplained misses as unresolved.
  • Document native passthrough eligibility separately from translated-route cache support and the existing retention choices. A global default change to one hour is not implied by this request.

Reproduction

Reported setup from #3646; this follow-up has not executed a new reproduction:

  1. Connect Claude Code or Claude Desktop 3P to a remote OpenCodex hub using proxy authentication. Configure the hub's intended route to Anthropic with its existing managed credential.
  2. Use a genuine, deliberately selected Anthropic model. Exclude unresolved Desktop aliases and other-provider routes from the comparison.
  3. Continue a conversation after an assistant thinking response, including a tool-result continuation. Compare the types and ordering of replayed blocks across the translated boundary using synthetic or privately held content.
  4. Record aggregate cache-read/cache-creation usage and elapsed time between turns. Compare supported short/long retention settings under otherwise stable conditions.
  5. Separately exercise an upstream-provided redacted-thinking block in a controlled protocol fixture. No such redacted block or valid signed replay fixture was attached to Bug: remote-hub Claude Desktop date aliases are forwarded to Anthropic as Opus (quota burn + cache miss) #3646; current-version coverage remains to be collected.

The existing report's HTTP 404/429 table demonstrates the alias/routing symptoms. It is not a cache-replay reproduction or a measured cache-hit comparison.

Version

Original reporter: OpenCodex 2.42.0 Windows client and 2.41.0 WSL client; Claude Code 2.1.261. The exact remote hub build was not independently established in the issue body. A maintainer comment interpreted the version split differently, so record actual hub/client builds during reproduction rather than treating that interpretation as verified.

Current-version runtime reproduction: pending. This follow-up only confirms the translation policy and cache-control configuration by source inspection.

Operating system

Original report: Windows 11 and WSL, with a remote hub. Exact hub OS/build: not supplied.

Provider and model

Anthropic OAuth pool on the hub; original report names claude-opus-4-8 and claude-haiku-4-5. This follow-up concerns intentional Anthropic routing, independently of GPT/GLM Desktop alias failures.

Logs or error output

No isolated replay failure or controlled cache-usage trace is attached yet. The public report contains alias-related 404/429 observations; do not reuse those as proof of this separate remainder. No request content, credentials, thinking text, signatures, or opaque redacted payloads are included here.

Screenshots and supporting files

Duplicate search found no separate issue covering this exact Anthropic proxy-auth replay/cache request:

Search scope: all issue states; title/body/comments for redacted_thinking, thinking cache, thinking replay, cacheRetention, and passthrough proxy; additional Anthropic/cache and open cache searches. Related issue bodies and relevant later comments were inspected, not just titles.

Redacted configuration

Reported configuration shape, not an executable configuration file:

hub runtimeRole: hub
connected client runtimeRole: client
Claude integration authMode: proxy
client credential: proxy admission token only (value omitted)
intended upstream: Anthropic, using a configured hub credential
cacheRetention: short (default); compare long separately

Checks

  • I searched existing issues and documentation.
  • I removed secrets, tokens, account details, request credentials, and personal data.

Activity

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

    bugSomething isn't workingproxyHTTP proxy, routing, reverse-proxy / management auth

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions