Repository navigation
fix(muse-proxy): alias the shell tool on the direct path - #2764
Conversation
Since #2753 the muse seat has failed every real agent request with 403 client_attestation_denied: Meta's subscription-key gate rejects request bodies whose function tools carry the well-known harness shell names (shell, bash). Verified live by bisecting a captured opencode request — every other tool, the instructions, and all client headers pass; the shell tool alone trips it, and aliases (run_command, terminal) pass. The direct path now presents shell as run_command (bash as terminal) in tool definitions, history calls, and tool_choice, and translates the model's calls back in both the buffered and streaming converters. An attestation denial that still occurs (the fingerprint moved) now falls back to the CLI door instead of failing the seat. The /v1/responses passthrough still forwards verbatim and will surface the same denial to any future native-provider client; aliasing there is a follow-up if that route gains a client.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 58 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
The muse seat has been hard-failing since the direct mode landed: every request carrying opencode's toolset gets a 403
client_attestation_deniedfrom Meta, and the direct path (by design) surfaces upstream answers instead of falling back.Root cause, found by capturing a real opencode request through a recording proxy and bisecting it against the live API: the gate keys on function tool names. Bodies containing a tool named
shell(orbash) are denied; everything else — the other 18 tools, the instructions, any client headers — passes.Fix, in
bin/muse-proxy.mjsonly:shellasrun_commandandbashasterminalupstream (tool definitions, historyfunction_callitems,tool_choice), and translates the model's calls back to the client names in both the buffered and the streaming response converters.Tests: two new cases in the proxy suite (alias round-trip incl. history; attestation denial falls back to exec). Suite: 22/22 pass.
Known follow-up, deliberately out of scope: the
/v1/responsespassthrough forwards bodies verbatim, so a future native-provider client would hit the same denial there.Need help on this PR? Tag
@codesmith-botwith what you need.