Skip to content

docs(llms.txt): explain how agents resolve a "resolved" swap outcome#79

Merged
LandynDev merged 1 commit into
testfrom
docs/llms-swap-outcome-guidance
May 6, 2026
Merged

docs(llms.txt): explain how agents resolve a "resolved" swap outcome#79
LandynDev merged 1 commit into
testfrom
docs/llms-swap-outcome-guidance

Conversation

@LandynDev
Copy link
Copy Markdown
Collaborator

Summary

Companion to the allways cli/agent-feedback-followups PR.

When a swap reaches a terminal state the on-chain contract prunes its row to keep storage bounded, so alw view swap <id> falls back to resolved (completed or timed out) and an agent has no way to tell from the CLI alone whether they got their funds. Rather than make the CLI track this client-side, document the recovery path so agents know where to look:

  • The events API (GET /events?swapId=<id>) still has the terminal SwapCompleted / SwapTimedOut event — that's authoritative and persists indefinitely from the indexer's perspective.
  • Cross-check by looking at the destination wallet for the expected receive amount around the FULFILLED block.

Also wires the new alw swap resume-reservation --send flag (added in the allways CLI PR) into the non-interactive cheat sheet so scripted agents know they can finish a resume without broadcasting source funds by hand.

Test plan

  • npm run build clean
  • Render check: confirm the new "Resolving a 'resolved' swap" block reads cleanly inline in the agents page after deploy

The CLI's `alw view swap <id>` falls back to `resolved (completed or
timed out)` once the contract prunes the swap state. Document the two
ways an agent can recover the actual terminal outcome — the events API
(SwapCompleted vs SwapTimedOut, persisted indefinitely by the indexer)
and a destination-wallet cross-check — so agents stop guessing.

Also note the new `alw swap resume-reservation --send` flag in the
non-interactive cheat sheet so scripted agents know they can complete a
resume without broadcasting source funds manually.
@LandynDev LandynDev merged commit 52465e5 into test May 6, 2026
2 checks passed
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