Skip to content

PSA: Anthropic's April 4 third-party harness ban affects claude-mem's default billing path #1826

Description

@ArtemisAI

What happened

On April 4, 2026, Anthropic began blocking third-party harnesses from using Claude subscription billing (Pro/Max). The restriction is being extended to all third-party harnesses in the coming weeks.

Coverage:

How this affects claude-mem

Claude-mem's observer agent uses the Claude Agent SDK query() to spawn a claude subprocess (SDKAgent.ts). By default — when no ANTHROPIC_API_KEY is set in ~/.claude-mem/.env — this subprocess authenticates via CLI subscription billing (EnvManager.ts:287).

This is exactly the "third-party harness" pattern Anthropic is restricting. Users on Pro/Max subscriptions who rely on the default auth path will find their observer agent silently failing or being blocked once enforcement reaches claude-mem.

Related issues

Options for users right now

  1. Set ANTHROPIC_API_KEY in ~/.claude-mem/.env — bills your API account directly, unaffected by the ban. But costs real money per token.
  2. Switch provider to Gemini (CLAUDE_MEM_PROVIDER=gemini) — free tier available via gemini-2.5-flash-lite. Already supported.
  3. Switch provider to OpenRouter (CLAUDE_MEM_PROVIDER=openrouter) — free models available (xiaomi/mimo-v2-flash:free). Already supported.
  4. Enable "extra usage" pay-as-you-go on your Anthropic account — Anthropic's official workaround, but adds variable costs.

Discussion: what should claude-mem do?

Some things worth considering:

  • Should the default change? Currently the default is CLI subscription billing with Claude Sonnet. Given the ban, should claude-mem default to Gemini free tier or OpenRouter free tier for observation/summary processing?
  • User-facing warning: Should the worker log a warning when it detects subscription-based auth is being used, explaining the risk?
  • Broader model support: Users may want to point the observer at self-hosted or alternative models (Gemma, Llama, etc.) through OpenAI-compatible APIs. The OpenRouter agent already supports this pattern, but a generic "OpenAI-compatible endpoint" option would give more flexibility.
  • Context window awareness: Different models have very different context windows (Haiku 200k, Gemini Flash 1M, Gemma ~8-32k). The observer prompt pipeline doesn't currently adapt to the model's context limits — it should, especially for smaller models.
  • Embedded mode (Feature request: Embedded/in-process mode for OpenClaw plugin (eliminate external worker requirement) #1252): Eliminating the subprocess entirely would make claude-mem immune to harness restrictions. This is a larger architectural change but may be the right long-term direction.

The existing alternative providers (Gemini, OpenRouter) are a solid escape hatch, but users need to know this is coming before their observer agent quietly stops working.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions