Repository navigation
fix(claude-plugin): follow installed Claude CLI identity - #478
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix the Claude subscription plugin advertising
claude-cli/2.1.280, which Anthropic rejects for Fable 5.2 (minimum 2.1.290), even when a newer Claude Code is installed.claude --versionlazily, directly throughexecFile(no shell), once per process; share the in-flight promise across concurrent OAuth/inference requests.x-app: cli, the system identity and dated beta feature IDs unchanged: they are not CLI version numbers. There is no plugin model allowlist; regression tests cover Fable 5.2 and Opus 5.5 model IDs and caller beta flags surviving shaping.Changed files
All changes are confined to
packages/claude-plugin/:src/identity.ts: detection, version floor and shared cache (new).src/oauth.ts: use the shared asynchronous identity for token requests.src/wire.ts: resolve the same identity for inference headers.src/hooks.ts: await headers and recheck cancellation before rewriting the request.test/identity.test.ts: detection parsing, newer/older versions, fallback failures, lazy/concurrent caching and minimum-version guard (new).test/oauth.test.ts,test/wire.test.ts: shared-identity assertions.test/hooks.test.ts: new-model and beta passthrough assertions.README.md: detection behavior and maintenance notes.Validation
bun testinpackages/claude-plugin: 43 passed.bun test --only-failures --rerun-each 10 --randomize: 430 passed, seed2900260791.bun typecheckinpackages/claude-plugin: passed (package script usestsc --noEmit).bun run check: passed, 37/37 typecheck tasks; lint reported existing warnings and zero errors.bun run prettier --check packages/claude-pluginandgit diff --check: passed.OPENCODE_CHANNEL=integration-v2 OPENCODE_TARGET=linux-x64 bun run --cwd packages/cli build: passed. Host-target restriction only; no release or installation.Live smoke test: blocked before provider request
Ran the built CLI with
--standalone,anthropic/claude-fable-5-2, an archived, explicitly titled session, and a one-step agent denying every tool. Prompt:Reply with exactly OK. Do not use tools.The run exited 1 with
provider.no-route: Model unavailable: anthropic/claude-fable-5-2before any Anthropic inference request. Follow-up--standalone auth listreturnedNo authenticated integrations;--standalone modelslisted only Morph/Yeta models. This host's shuvcode does not have an active Claude subscription connection. No credential import/rotation or live server replacement was attempted. End-to-end Anthropic acceptance and subscription billing eligibility remain unverified.Release
Do not merge/release from this task. Intended for the orchestrator's later integration-v2 release together with the upstream sync.
Visual