Skip to content

Disable Anthropic identity compression on proxy path #4

Description

@pythondatascrape

Summary

Anthropic requests proxied through Engram became unreliable when the proxy rewrote Claude's system prompt for identity compression. Direct Claude requests worked, but proxied requests intermittently received upstream 429 rate-limit responses.

Type

Bug

Affected Area

Anthropic proxy path ()

Reproduction Steps

  1. Configure Claude Code to route Anthropic traffic through Engram on .
  2. Start Engram and issue a normal Claude request with the default large Claude system prompt.
  3. Observe upstream 429 responses when Anthropic identity/system compression is enabled.
  4. Disable Anthropic system/identity compression and retry the same request.

Expected vs Actual

  • Expected: Claude requests proxied through Engram should remain reliable while preserving safe compression.
  • Actual: Rewriting the Anthropic prompt for identity compression triggered upstream throttling, while keeping the system prompt verbatim restored stability.

Investigation Findings

  • Direct Claude requests succeeded while proxied requests failed only when Anthropic system/identity compression was enabled.
  • Disabling Anthropic identity/system compression restored reliable requests while window/context compression continued to work.
  • The Anthropic preflight also added unnecessary upstream traffic and was removed as part of the fix.
  • Relevant files: , ,

Proposed Resolution / Guidance

Keep the Anthropic prompt verbatim and disable identity compression on the Anthropic proxy path. Continue applying conversation window compression and improved upstream error logging, and leave OpenAI-side identity compression unchanged.

Core Application Impact

P1 — High
This significantly degraded the core Claude-through-Engram workflow, but a direct-Claude workaround existed.

Related

  • Branch:

Metadata

Metadata

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions