Your agent can sign itself up for Memoir Cloud
Pushing memories to Memoir Cloud used to start with a person approving a login in a browser. On a machine with nobody at the keyboard, that was a dead end. memoir login --agent gives the agent a throwaway account that owns one store for the repo, and memoir claim moves that store into your own account whenever you're ready.
The problem: the push stops at the login
Memoir Cloud
keeps a copy of a repo's memory store online, so a second machine,
a teammate or a fresh container can pull what the agent has already
learned. Until now, getting a store there started with
memoir login: a link and a code, and a person clicking
approve in a browser.
That works when you are sitting at the machine. Agents often aren't run that way. A coding agent in a remote dev container, on a CI runner, or on a laptop that has never seen your cloud account reaches the push step and has nobody to ask. The memories it gathered stay on a disk that may be gone tomorrow.
The fix: an account that belongs to the repo
memoir login --agent, run inside the repo, asks the
cloud for an agent account: a throwaway account that
owns exactly one store, named after the repo, created over HTTP with
no browser and no person in the loop. The store is linked as
origin, and a normal memoir push works from
there.
memoir login --agent # agent-k7x2m9 now owns agent-k7x2m9/<repo name>
memoir push
memoir cloud open # a single-use link into the web UI
memoir claim # later, as yourself: the store moves into your account
The token the cloud hands back lives with the store,
in .git/memoir-cloud/token with owner-only permissions,
not in your machine-wide login file. Other repos on the same machine
never pick it up, and it is only ever sent to the gateway that issued
it. If you already have MEMOIR_API_KEY set or a saved
login, those still apply: every cloud command checks the environment
variable first, then the store's own token, then the saved login.
Guardrails for an account nobody signed up for
The cloud has no way to confirm that a person agreed to any of this, so an agent account is deliberately small:
- Capped: 5 branches and 2,000 memories per branch. A push past either limit is refused with a plain message and a hint to claim the store.
- Temporary: an agent account idle for 30 days is deleted.
- Rate-limited: the cloud limits how many agent accounts one address can create.
- One store only: the token can't create a second store.
Consent is captured on your side instead. In Claude Code, when
/memoir:push finds no login and no linked store, it asks
before doing anything: Create an agent account for this repo
(recommended) or Sign in with my own account. Nothing is
provisioned unless you pick the first option.
Claim it when you're ready
An agent account has no password, so memoir cloud open
is how you look inside it: it prints a link that opens the store in
the web UI, valid once and for five minutes.
When the store is worth keeping, run memoir claim in
the repo as yourself. It signs you in with the usual browser approval
if this machine has no login yet, moves the store into your account,
and points origin at the new address. The caps and the
30-day expiry go away. The token keeps working, now as yours and
still limited to that one store, so the agent's pushes carry on with
no new login. If you already own a store with the same name,
--name picks another, and if the store was created for a
different repo URL than this clone's, memoir claim warns
you rather than failing.
The order is the point. The agent doesn't have to wait for you to start keeping its memory somewhere safe, and you decide later, with the store in front of you, whether it belongs in your account.
The short list
memoir login --agentcreates an agent account and a cloud store for this repo, with no browser login- The token stays with the store, is never sent to another gateway and is never printed
- Agent stores are capped at 5 branches and 2,000 memories per branch, and deleted after 30 idle days
memoir cloud opengives a single-use, five-minute link into the web UImemoir claimmoves the store into your account, lifts the caps and keeps the token working/memoir:pushin Claude Code offers an agent account before the browser login, and only creates one if you say yes
The agent shouldn't need you at the keyboard to save what it learned. Now it can start the store on its own, and hand it to you later.