## Windows x64 Signer Investigation

### Signing Chain (Poncho → x402 payment)
1. Poncho spawns `bun x agentcash@latest --provider poncho --sessionId <chatId>` as MCP subprocess
2. MCP's `fetch` tool creates `ExactEvmScheme(account)` from `@x402/evm/exact/client`
3. `ExactEvmScheme.createPaymentPayload` routes to EIP-3009 or Permit2 based on `assetTransferMethod`
4. Both paths call `account.signTypedData()` (viem's `privateKeyToAccount` → `@noble/curves` secp256k1)
5. Signed payload goes into `PAYMENT-SIGNATURE` header for retry

### x402facilitator.dev
- Deposited $2.50 (balance $4.97) from Craig's wallet
- Facilitator ID: `cddea943-c042-[REDACTED_PHONE]-8900b4968319`
- URL: `https://x402facilitator.dev/api/facilitator/v2/cddea943-c042-[REDACTED_PHONE]-8900b4968319`
- $0.01/settle, verify free, supported free

### Fortune Server
- Standalone server at `fortune-server.mjs` with custom ESM loader (stubs `mpay`, fixes `next/server`)
- Uses the x402facilitator.dev facilitator
- Serves `/fortune` (paid $0.001) and `/fortune-free` (SIWX auth)

### Diagnostic Script
- `windows-signer-diagnostic.mjs` in agentcash-router repo
- Tests: env → wallet load → account derivation → signMessage → signTypedData (EIP-3009) → signTypedData (Permit2) → x402 client → e2e payment
- All passing on Linux: derive 142ms, signs <10ms each

### Key Finding
- Issue #174 says "chats don't work, I believe due to skills" — skill extraction uses `unzip` which doesn't exist on Windows
- Alvaro's `aec/win` branch replaces `unzip` with `extract-zip` npm package
- The signer bug may be downstream of chat startup failures — if chats can't start, MCP never runs

### Wallet Migration
- agentcash MCP now stores wallet at `~/.agentcash/wallet.json` (was `~/.x402scan-mcp/`)
- Auto-migration in `packages/external/mcp/src/shared/fs.ts`