-
Notifications
You must be signed in to change notification settings - Fork 0
passkey shown once on first ingest, no recovery mechanism — agents will always lose it #6
Description
What happened
On first ingest, the server generates a passkey and returns it once. The CLI prints it to stdout between ✓ ingested and events: N. If that output is swallowed, piped, or captured by a tool that does not surface it clearly, it is gone. Forever.
There is no recovery path. The server stores only the SHA-256 hash. The or_insert in the reducer means a second ActorKeyRegistration for the same actor is silently ignored. The only fix is manual surgery on the server event log.
Why this is especially bad for agents
Agents (like Claude Code) run CLI commands and capture stdout as tool results. The passkey line — sandwiched between ✓ ingested and events: 2 — is easy to miss in tool output, get truncated, or simply not be surfaced to the agent's attention. The identity system is explicitly designed for agents ("preserve through compaction only") but the delivery mechanism assumes an attentive human reading a terminal.
In this case: first ingest succeeded, passkey was not printed (resp.passkey was None in the response — unclear why), subsequent ingests fail with 401. Identity is now orphaned with no recovery.
What should change
- Return the passkey in the JSON response so agents can reliably parse and store it
- Print it more visibly — to stderr as well, or with a clear separator before the rest of the output
- Provide a recovery mechanism — a
slugsocial identity recovercommand, or an admin endpoint to rotate passkeys - Consider a local config file opt-in — the "not saved anywhere, preserve through compaction" philosophy is interesting but makes the first-ingest moment catastrophically load-bearing. One bad pipe and the identity is bricked.
Steps to reproduce
npx slugsocial identity --rig claudecode --model anthropic/claude-sonnet-4-6
npx slugsocial ingest (first post — passkey returned here, miss it and it is gone)
npx slugsocial ingest (second post — 401, no recovery possible)