Repository navigation
[review] fix(claude): a claude-code agent on a Sylphx profile reaches its model with the profile key - #293
Queued
shtse8 wants to merge 3 commits into
Queued
[review] fix(claude): a claude-code agent on a Sylphx profile reaches its model with the profile key#293shtse8 wants to merge 3 commits into
shtse8 wants to merge 3 commits into
Conversation
… of failing every turn Report #34: claude-code agents spawned with profile sylphx/default and model sylphx/openai/gpt-6.1-sol failed every turn with "Not logged in". Sylphx serves its models through an OpenAI-compatible API, and nothing gives Claude Code a Sylphx sign-in or an Anthropic-compatible route for a profile; the only Claude credential such an agent got was a stale or placeholder claudeAiOauth copy. The provider catalog nevertheless listed claude-code and claude-cloud as Sylphx-compatible, so spawn and switch accepted the pairing. The Claude harnesses are dropped from the Sylphx defaults (a profile.json that names them explicitly still wins), and a creation checks before its row exists that the harness runs the profile, or without one the model's provider, naming the harnesses that do.
… profile key Review of #293: the refusal did nothing live (sylphx profile.json files list claude-code explicitly) and its premise was wrong. Sylphx answers the Anthropic Messages API at its origin: verified live with the sylphx/default key, POST /v1/messages for openai/gpt-6.1-sol streams with tools, thinking, cache_control and anthropic-beta headers. What was missing is AnyAgents: it never gave Claude Code a Sylphx key and base URL, so Claude Code fell back to a Claude.ai sign-in the agent did not have ("Not logged in", report #34). A claude-code agent bound to a Sylphx profile, or given a sylphx/... model, now starts with ANTHROPIC_BASE_URL (the Sylphx origin, from the same place the codex wiring reads it), ANTHROPIC_AUTH_TOKEN (the profile key, same resolution as codex), --model with the id Sylphx serves (sylphx/ prefix and #effort removed) and its small/haiku model set to that id; a stray ANTHROPIC_API_KEY is dropped for it. Agents on Anthropic start as before. The catalog change is reverted. The early profile check is kept, for an explicit profile only, so a creation it refuses writes no row to roll back; the model-only check is dropped (it made fresh installs stricter).
shtse8
added this pull request to the merge queue
Nov 16, 2026
Any commits made after this event will not be merged.
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 16, 2026
shtse8
added this pull request to the merge queue
Nov 16, 2026
Any commits made after this event will not be merged.
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 16, 2026
shtse8
added this pull request to the merge queue
Nov 16, 2026
Any commits made after this event will not be merged.
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.
Problem
Operator report #34 (eng-fun-big2-keel-dropin, 19:58Z): every claude-code sub-agent spawned with model
sylphx/openai/gpt-6.1-soland profilesylphx/defaultfailed withturn_state: errored, "Not logged in · Pleaserun /login" (4 of 4 spawns). The same spawns with
claude-opus-5-5on ananthropic/*profile worked.Root cause
What is missing is AnyAgents' wiring, not support on the Sylphx side. A claude-code agent bound to a Sylphx profile
is started with no Sylphx base URL and no key, so Claude Code falls back to a Claude.ai sign-in the agent does not
have. Codex already gets the Sylphx base URL and profile key (
resolve_sylphx_codex_provider); Claude Code never did.What I checked:
sylphx/defaultkey; the key never appeared in argv oroutput):
GET /v1/modelsreturns 200 and listsopenai/gpt-6.1-sol.POST /v1/messagesforopenai/gpt-6.1-sol, with bearer auth,stream: trueand a tool definition, returns200: an SSE stream through
message_stop, text "ok".thinking,cache_controlon system and user blocks,metadata, and ananthropic-betaheader, also returns 200 and ends with
end_turn.credential is a placeholder.
Fix
A claude-code agent bound to a Sylphx profile (
.anyagents-profile=sylphx[/…]), or given asylphx/...model,starts with:
ANTHROPIC_BASE_URL: the Sylphx origin. It is read from the same place the codex wiring reads it, with/v1removed because Claude Code adds
/v1/messagesitself.ANTHROPIC_AUTH_TOKEN: the profile's Sylphx key, resolved the same way as for codex and sent as a bearer token.A stray
ANTHROPIC_API_KEYis dropped, so it cannot take precedence.--modelset to the id Sylphx serves:sylphx/openai/gpt-6.1-sol#highbecomesopenai/gpt-6.1-sol, and--effort highis kept.ANTHROPIC_SMALL_FAST_MODELandANTHROPIC_DEFAULT_HAIKU_MODELset to the same id, so Claude Code's backgroundcalls do not ask Sylphx for a Claude id.
Agents on Anthropic profiles start exactly as before.
The first version of this PR (a refusal and a catalog change) is reverted. One part of it is kept: the explicit-profile
compatibility check now also runs before the agent row is written, so a creation it refuses leaves nothing to roll
back. A rollback deletes everything keyed by the agent, and until #289 lands that holds the Store writer. The
model-only check from the first version is dropped, because it made fresh installs stricter.
Tests
a_claude_code_agent_on_sylphx_reaches_it_with_the_profile_key:effort, and a leaked
ANTHROPIC_API_KEYis dropped;a_creation_its_profile_cannot_run_is_refused_and_leaves_no_agent.cargo test -p anyagents --bin anyagents -- create:: vendor:: mcp_config::: 126 passed. Clippy-D warningsandcargo fmt --checkare clean.Live notes
effect for the next such spawn after deploy.
profiles/sylphx/default/.claude/.credentials.jsonholds a strayClaude.ai OAuth credential.