Skip to content

fix(muse-proxy): alias the shell tool on the direct path - #2764

Merged
dezren39 merged 1 commit into
mainfrom
fix-muse-direct-shell
Oct 30, 2026
Merged

dezren39 merged 1 commit into
mainfrom
fix-muse-direct-shell

Conversation

@dezren39

@dezren39 dezren39 commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

The muse seat has been hard-failing since the direct mode landed: every request carrying opencode's toolset gets a 403 client_attestation_denied from 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 (or bash) are denied; everything else — the other 18 tools, the instructions, any client headers — passes.

Fix, in bin/muse-proxy.mjs only:

  • The direct translator presents shell as run_command and bash as terminal upstream (tool definitions, history function_call items, tool_choice), and translates the model's calls back to the client names in both the buffered and the streaming response converters.
  • If an attestation denial still occurs (Meta extends the fingerprint), the direct path now falls back to the CLI door instead of failing the seat.

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/responses passthrough forwards bodies verbatim, so a future native-provider client would hit the same denial there.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

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.
@dezren39
dezren39 requested a review from a team as a code owner October 30, 2026 14:13
@coderabbitai

coderabbitai Bot commented Oct 30, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 069c3c5a-9b97-4fdf-9a4a-9e165bff9949
Commits

Reviewing files that changed from the base of the PR and between 111a318 and 8215da2.

Files selected for processing: 2
  • bin/muse-proxy.mjs
  • bin/muse-proxy.test.mjs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T14:14:48.313309Z 8215da2 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant