## Delegating Isolated Subtasks to TESI (`tesi` MCP Server)

When working on a scoped coding, UI prototype, download-verification, or CSV/ledger reconciliation subtask that has **explicit, runnable acceptance checks** and does not require unexportable host secrets:

1. **Quote first for free (`0` cost, `0` key required):**
   Call `tesi_quote` (pass `sourceDir` if packing safe UTF-8 files from a subfolder; `.env*`, keys, symlinks, and binaries are refused automatically) to verify byte size, minimum starting credit, and eligible prepaid packs (`$10`, `$25`, `$50`, `$100` USD).
2. **Keep the parent context window clean:**
   Delegate self-contained build/test loops via `tesi_work` (`effort: "medium"`, optional `extractFilesTo: "./tesi-delivered"`). TESI executes and tests the deliverable on an isolated Linux VM (`1 vCPU, 2 GB RAM, 4 GB disk`) and returns a SHA-256 verified reply + `TESI-DELIVERY-MANIFEST.json` instead of streaming 50,000+ retry tokens into this conversation.
3. **Opaque key & manual spend cap (`TESI-Topup-Mode: manual`):**
   Never paste raw `tesi_ak_...` bearer keys into prompts or tool arguments. Use `tesi_prepare_purchase` (`amountCents: 1000` for `$10 USD`, or open `https://toolsenabled.ai/agents/?agentPack=1000#agent-funding`) and `tesi_claim_key` so credentials stay in a mode-`0600` local file (`./tesi-purchase/key.json`).
4. **Crash-safe recovery:**
   If a connection drops or returns HTTP `409`, call `tesi_receipt` with the same `requestId` (`mw_...`) to recover the recorded result without double-spending.
