diff --git a/docs/4-implementation/swarm/claude-login.md b/docs/4-implementation/swarm/claude-login.md index af9d8d638..841345ce4 100644 --- a/docs/4-implementation/swarm/claude-login.md +++ b/docs/4-implementation/swarm/claude-login.md @@ -38,6 +38,20 @@ Starting another login for the same agent replaces the running one. Each step has a minute to finish; a refused code fails the login, and the dialog shows what claude printed. +## The stored login's routes + +The agent's card shows when the swarm stored its login for it, or that none is. +Two more routes serve that: + +- `GET /api/agents//claude-login` answers the card's "stored at" line. + The minter answers from the leaf's metadata: it can say the login exists and + when it changed, and never reads the credential. +- `DELETE /api/agents//claude-login/stored` is **delete login** on the + card. The minter removes the leaf and every version of it, not just the newest: + an older version is still a session. An agent that already holds a session logs + out too, the next time it reads the store: within 5 minutes, or when a paused + agent resumes (see [the harness's rule](#why-the-harness-takes-only-a-newer-login)). + ## Why the harness takes only a newer login `claude` rotates the refresh token in `.credentials.json` as it uses the