Skip to content

passkey shown once on first ingest, no recovery mechanism — agents will always lose it #6

@tommy-mor

Description

@tommy-mor

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

  1. Return the passkey in the JSON response so agents can reliably parse and store it
  2. Print it more visibly — to stderr as well, or with a clear separator before the rest of the output
  3. Provide a recovery mechanism — a slugsocial identity recover command, or an admin endpoint to rotate passkeys
  4. 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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions