Skip to content

[Bug] claude-fable-5-2 fails with claude_code_version_too_old on the bundled SDK 0.17.6 #184

Open

Description

@hs1662

Describe the breakage

A chat on anthropic/claude-fable-5-2 fails before the model answers. Anthropic rejects the request with HTTP 400 because the bundled SDK identifies itself as Claude Code 2.1.280, and this model needs 2.1.290 or newer.

Other Anthropic models on the same account work in the app. The gjc CLI 0.20.0 on the same host, with the same agent directory and account, runs claude-fable-5-2 without error.

Smallest reproduction

  1. Run the self-hosted server bundle 2.0.0-beta.20 with an Anthropic subscription account signed in.
  2. Create a session and select anthropic/claude-fable-5-2, or use a default profile whose first model is that one.
  3. Send any prompt.

The run ends with an error frame and then complete. anthropic/claude-opus-5-5 and anthropic/claude-sonnet-5-5 complete normally in the same session setup.

Expected result

The app runs every Anthropic model that the signed-in account and the current gjc CLI can run.

Diagnostic material

Error frame content, cut where my capture ended:

400 {"type":"error","error":{"type":"invalid_request_error","message":"Claude Code 2.1.280 does not support this model; version 2.1.290 or newer is required. Run 'claude update', or update the Claude desktop app, then try again.","details":{"error_code":"claude_code_version_too_old" ...

Cause

@gajae-code/[email protected] has a fixed value in src/providers/anthropic.ts:

export const claudeCodeVersion = "2.1.280";

@gajae-code/[email protected] is the first release that replaces it. It adds src/providers/claude-code-version.ts, and anthropic.ts calls getClaudeCodeVersion() in its two places. The resolver returns the higher of a bundled floor (2.1.284) and the latest published Claude Code release. It refreshes in the background every 6 hours, caches the result on disk, and accepts GJC_CLAUDE_CODE_VERSION as a pin. 0.17.7 and 0.18.0 do not have this file.

The floor alone is not enough for this model. The CLI works because its cache holds a newer resolved version (2.1.325 on this host).

Why an operator cannot fix it

The app pins the SDK in three places, so the fix has to be a release:

  • package.json pins @gajae-code/coding-agent to exactly 0.17.6.
  • patches/gjc-sdk-lifecycle/manifest.json pins the three SDK packages to 0.17.6 and patches anthropic.ts.
  • server/gjc-runtime-manifest.json carries the post-patch hash of anthropic.ts, and the worker checks it before the SDK starts.

Size of the port

I replayed the ordered replacements of the current lifecycle manifest against pristine npm pack --ignore-scripts sources of four SDK versions and counted the edits whose before text still occurs exactly once.

SDK version Edits that match once (of 209) Edits that need a new anchor Patched files that replay unchanged (of 32)
0.18.1 197 12 27
0.18.12 175 34 20
0.19.3 155 54 13
0.20.0 148 61 13

For the 0.18.1 hop, the 12 edits are in sdk/session.ts (4), ai/src/auth-storage.ts (3), agent-core/src/agent-loop.ts (2), sdk/prompt-deadline-manager.ts (2) and config/model-registry.ts (1). 22 of the 32 patched files are byte-identical to 0.17.6. The other 10 differ by about 3,900 added or removed lines, most of them in sdk/host/session-runtime.ts and session/agent-session.ts.

This is a replay count, not an audit. I did not review the changed lines for new detached work.

One decision the port needs

The new resolver starts detached work. get() runs void refresh() when the cache is older than 6 hours. That is one fetch with a 5 second timeout and one Bun.write of the cache file. claude-code-version.ts would be a 33rd patched file, and shared/sdkLifecyclePolicy.json allows 32.

Two properties of the resolver may help. It does no network or disk work when GJC_CLAUDE_CODE_VERSION is set or when NODE_ENV is test.

Your setup

  • Gajae Code App version: 2.0.0-beta.20
  • Install method: server bundle, self-hosted, systemd user unit
  • Operating system and version: Ubuntu 24.04.5 LTS, x86_64
  • Browser and version: not relevant. Reproduced over the app's /ws chat.send path
  • GJC/runtime version: bundled @gajae-code/coding-agent 0.17.6. gjc CLI 0.20.0 on the same host

Anything else

It fails on every attempt. The workaround is to select another model for the session. main at 01b5a30 still pins 0.17.6.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions