Repository navigation
Fix Agent Wallet switching and approval docs for agents without the skill - #3073
Merged
Merged
Conversation
…kill. Support screenshots showed agents that read the docs (not the skill) choosing Guard Mode for users, creating a new wallet per sign-in method, and telling users "MetaMask will probably ask you to approve it" with no surface named. - Add Switch modes and wallets, Approve requests, and Rules for AI agents pages. - Resolve docs/skill contradictions against CLI 7.2.0: mm init reuses existing wallets and their trading mode, defaults to Guard Mode when --mode is omitted non-interactively, sets a trading mode for bring your own wallet too, and BYOK requests are submitted as jobs that can return a pollingId. - Remove the non-existent Beast Mode terminal confirmation prompt; document confirmed / pending_approval returns and the CLI's `mm mode set` help typo. - Add missing trading mode and policy approval error codes. - Order the Agent Wallet llms bundles by task with an agent preamble and CLI version, and drop the duplicate Trading modes stub heading. - Add agent-facing writing conventions and a cross-model eval prompt set. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The HTML-to-markdown conversion behind every per-page .md produced noise that agents read verbatim: - Strip Docusaurus heading anchors, which emitted `[](#x "Direct link to x")` after every heading (275 in Agent Wallet alone). The HTML side marks them data-markdown-ignore so AFDocs parity stays symmetric. - Copy the Prism language class from <pre> to <code> so fences are tagged. - Label each tab panel (npm2yarn, file tabs) instead of a detached tab list. - Keep inline code in table cells, which node-html-markdown dropped. Checked against 150 built pages: no lost words, no table structure changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…tching-approvals # Conflicts: # agent-wallet/reference/error-codes.md
| version: 'CLI 7.2.0', | ||
| rootContent: [ | ||
| 'If you are an AI agent operating the `mm` CLI, read "Rules for AI agents" first.', | ||
| 'If you can load skills, install `npx skills add MetaMask/agent-skills` and prefer the skill.', |
shahbaz17
approved these changes
Oct 16, 2026
This branch was successfully deployed
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.
Why
Support screenshots shared by Zhen showed a red route: agents that read the docs (not the
metamask-agent-walletskill) mishandled trading-mode switching and where to find the 2FA approval. A Grok-based agent picked Guard Mode for the user on every sign-in, ended up creating several wallets, and said "MetaMask will probably ask you to approve it" without naming where. Many agents read these docs without loading the skill and quote them to users as written, so the docs have to carry the same operating detail as the skill.What changed
Commit 1: docs, skill parity, llms bundles
--mode, loads the trading mode from the server--modein a non-interactive sessionmm initsets one for BYOK too (the CLI labels BYOK policy-based 2FA "coming soon")pollingIdis possibleAWAITING_MFA/pending_approval, and 8 missing approval and wallet error codes.llms-agent-wallet*.txtnow lists pages in task order (agent rules → quickstart → setup → switching → approvals → troubleshooting), starts with a preamble for agents and the CLI version, and no longer has the duplicate## Trading modesstub heading..cursor/rules/product-agent-wallet.mdcand a 10-prompt cross-model check atscripts/agent-wallet-docs-eval.md.Commit 2: per-page
.mdconverter (affects all products, can be split out)[](#x "Direct link to x")) from every per-page.md. The HTML side marks the same anchorsdata-markdown-ignoreso AFDocs parity stays symmetric.Verification
npm run buildpasses, with no new broken-link warnings for Agent Wallet.node scripts/verify-llms-output.jspasses: 25/25 pages present, ordered, with the preamble.markdown-content-parityagainst the Vercel preview, and the cross-model prompt set (Claude, GPT, Grok/Gemini).Reviewer notes
.cursor/rules/product-agent-wallet.mdcpreviously said not to paste skill content into the docs. It now allows a docs-voice mirror inagent-rules.md, which must be kept in sync with the skill.--modeis omitted" (read from source).Follow-ups outside this repo
MetaMask/agentic):mm wallet trading-mode set --helpand the post-init hint both referencemm mode set, which doesn't exist.mm wallet requests list/watchhelp says "server-wallet mode only" but doesn't enforce it.MetaMask/agent-skills):onboarding.mdsays Beast Mode "skips all policy checks and confirmations", which contradicts the product copy. The confirmation table needs the "never choose modes for the user" rule. The skill is pinned to CLI 7.0.0.🤖 Generated with Claude Code