Skip to content

fix: instant wallet first call names balance with new:true - #8

Open
eminogrande wants to merge 2 commits into
mainfrom
fix/wallet-instant-wallet-text-20261028
Open

eminogrande wants to merge 2 commits into
mainfrom
fix/wallet-instant-wallet-text-20261028

Conversation

@eminogrande

Copy link
Copy Markdown
Contributor

Live 2026-10-28 at 9513a44339cd (wallet.paymentrequired.com, service_mode: wallet), the single real instant-wallet call returned "The wallet service cannot pay the network fee right now. Try again later with the same request_id." — but creation has no request id to repeat. Diagnosis: wallet-agent-diagnosis/VERDICT.md.

Cause

src/mcp-wallet-tool.mjs mapped operator_admission_budget_exhausted twice (:81 correct creation text, :91 payment retry text). The later key wins, so the creation mapper at :261-266 emitted the payment sentence. The schema around :124-141 also said "Send wallet_key always" to a first-time caller with no key, and never said that new:true on balance is the instant first call; tools-only models asked "new or existing?" instead of calling it.

Change (text only)

  • remove the duplicate key; creation keeps "No new wallet can be opened right now. Existing wallets keep working. Try again later."
  • description, balance action, new and wallet_key state the exact first call: balance with new:true, no wallet_key, no session, no signup; wallet_key always only after the first answer
  • bare balance (askFirst) names that exact call (src/mcp-wallet-merge.mjs:37)
  • scripts/check-wallet-ask.mjs asserts one mapping, the creation sentence without request_id, and both wordings

No create action, no auto-create on bare balance, no custody/capacity/behavior change.

Verification

  • npm run check ok
  • npm run check:ask ok (wallet ask + settlement fallback)
  • npm run check:ask:regression ok (three negative controls; restored candidate passes)
  • new assertions proven by sabotage: re-adding the duplicate key fails "Reason key must be mapped once"; removing the description sentence fails "Tool description must name the instant first call"; both restored

Base main already carries 9513a44 as squash 6cf518e; this branch is cut from the exact live SHA. Open PR #6 also edits src/mcp-wallet-tool.mjs (lost-key answer) but not these lines.

Live 2026-10-28 at 9513a44: the first real instant-wallet call failed with
"pay the network fee ... same request_id" even though creation takes no
request id. Cause: operator_admission_budget_exhausted was mapped twice and
the later payment sentence overwrote the creation sentence at :81.

- drop the duplicate reason key; creation keeps "No new wallet can be opened
  right now. Existing wallets keep working. Try again later."
- tool description, balance action, new and wallet_key state the instant
  first call: balance with new:true, no wallet_key, no session, no signup;
  wallet_key always only after the first answer
- bare balance (askFirst) names that exact call instead of asking
  "new or existing?"

Text only: no create action, no auto-create, no custody or capacity change.
check-wallet-ask asserts the single mapping and both wordings; verified by
removing the duplicate and the description sentence in turn.
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