Skip to content

v0.2.3: document approval→wait→main-tx pattern to all agents - #11

Merged
szhygulin merged 1 commit into
mainfrom
docs/approval-flow-guidance
Apr 14, 2026
Merged

v0.2.3: document approval→wait→main-tx pattern to all agents#11
szhygulin merged 1 commit into
mainfrom
docs/approval-flow-guidance

Conversation

@szhygulin

Copy link
Copy Markdown
Collaborator

Summary

Bakes the approval-then-wait guidance into the MCP server itself so every agent — not just ones with Claude's memory — learns the pattern.

  • Server `instructions`: adds a TWO-STEP ALLOWANCE FLOWS section. Tells agents to submit approval first, poll `get_transaction_status` until confirmed, and only then simulate / send the dependent main tx.
  • `simulate_transaction` description: explicit warning against simulating a tx whose approval is still pending (avoids the misleading "insufficient allowance" revert).
  • Version bumped to 0.2.3; `server.json` updated accordingly.

Test plan

  • `npm run build`
  • `npm test`
  • Merge, trigger workflow_dispatch, verify v0.2.3 publishes to both npm and MCP Registry

🤖 Generated with Claude Code

Agents were simulating the main tx immediately after submitting the
ERC-20 approval, which fails with "insufficient allowance" because
the approval isn't yet mined. The revert is misleading — it looks
like a tx-builder bug.

Bakes the correct sequence into two agent-facing surfaces so any
MCP client (not just Claude + memory) sees it:
- server `instructions`: new TWO-STEP ALLOWANCE FLOWS section telling
  agents to poll get_transaction_status on the approval until
  confirmed before simulating/sending the dependent main tx
- `simulate_transaction` tool description: explicit warning not to
  simulate a tx whose approval is still pending

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@szhygulin
szhygulin merged commit d5bb7ee into main Apr 14, 2026
2 checks passed
@szhygulin
szhygulin deleted the docs/approval-flow-guidance branch April 25, 2026 02:14
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