Skip to main content
Blog
Deep diveProtocol translation / OAuth / Model routing

Foxl v0.2.16: Claude Code OAuth, Reborn as a Compatibility Layer

Live probes showed that system-prompt and tool-name shapes changed observed Claude subscription routing. Foxl shipped a compatibility layer, then documented the limits of treating provider behavior as a stable contract.

Foxl TeamUpdated 3 min read

A compatibility layer translating Foxl agent requests into the protocol and model identifiers accepted by the Claude subscription path.
On this page
Reviewed against the shipped implementation and retained tests on July 16, 2026.

Published on April 21, 2026, this post records the Claude Code OAuth compatibility mode shipped in Foxl v0.2.16. It describes the request shape and model catalog at that release, not a permanent contract with Anthropic.

Shipped behavior

v0.2.16 re-enabled the Claude Code OAuth provider after v0.2.15 had hidden it. The selectable models at release were Opus 4.7 and Sonnet 4.6. Requests still used the user's Claude Code credentials, but Foxl changed the payload at the transport boundary before sending it to Anthropic.

The change was based on live probes that observed different subscription routing when Foxl sent its normal system prompt and native tool names. Those observations justified a compatibility path for this release, but they did not establish a documented or stable Anthropic API guarantee.

System prompt rewrite

The transport left the Claude Code preamble in the system field. Foxl's persona and workspace context moved into a <foxl-context> prefix on the first user message. The agent still received that context, but with lower instruction precedence than a system message.

Tool adapter

Four Foxl tools were exposed under Claude Code compatible names:

  • exec as Bash
  • file_read as Read
  • code_search as Grep
  • web_fetch as WebFetch

Each wrapper translated the model's Claude Code shaped input back to the existing Foxl callback. For example, the Bash wrapper converted a millisecond timeout to the seconds expected by exec. If several Foxl tools mapped to one wire name, the adapter kept one owner and dropped the rest.

Implementation implication

Compatibility mode changed the tools visible to the model, not just their labels. Memory, workspace memory, subagents, schedules, channel sends, browser controls, image viewing, and other tools without an adapter were omitted. A conversation using this provider therefore had a smaller capability set than the Anthropic API key and Foxl relay paths.

The rewrite lived in compat/message-rewriter.ts and compat/tool-adapter.ts, with the transport invoking both before the HTTP request. The Strands tool callbacks remained the execution layer after a supported tool call was translated.

Known limitation and follow-up

OAuth endpoint behavior, subscription eligibility, model access, and usage accounting are controlled by Anthropic. Foxl could shape requests and report failures, but it could not guarantee that a request would always use a particular allowance. Users needing the full Foxl tool registry had to use another configured provider.

Correction: April 22, 2026

v0.2.17 briefly bypassed the tool adapter and re-added Haiku 4.5 after raw API probes accepted native Foxl tools. v0.2.18 reverted that change the same day because full Strands agent requests still produced "out of extra usage" failures. The raw probe did not reproduce the production request shape. The compatibility adapter returned to the supported path.

Correction: July 16, 2026

The model list is no longer limited to the two v0.2.16 entries. Current source lists Fable 5, Opus 4.8, Opus 4.7, Sonnet 5, and Sonnet 4.6 for Claude Code OAuth. The legacy claude-code/opus alias now resolves to Opus 4.8. Haiku aliases remain for persisted selections, but Haiku is not in the selectable OAuth catalog. The request and tool compatibility layer is still active.

How to verify

  • Select Claude Code OAuth and confirm the provider reports available credentials.
  • Ask the agent to read a file, search code, or run a harmless shell command. Those calls should execute through Read, Grep, or Bash.
  • Check the server log for [CompatTools]. It reports the tool names kept and dropped for that invocation.
  • Use the credential-gated scripts under foxl/scripts/test-claude-code-oauth-*.mjs for a live transport check. They contact Anthropic and may consume account usage.

References and further reading

  1. Configure model providersDocumentation
  2. Current model compatibilityDocumentation