Without asking
Two flags cover the same ground with no prompt, for a script or a coding agent acting for you:--list needs no project — it reports every supported agent, the directory its
history normally lives in, whether that directory holds history on this machine,
and, if run inside a project, what that project currently syncs from. It is what
lets someone else put the choice to you before setting it.
--set replaces the choice outright, taking name or name=/path/to/history
entries. A directory that does not hold that agent’s history is refused, the
same as when typed into the prompt.
Without asking
Two flags cover the same ground with no prompt, for a script or a coding agent acting for you:--list needs no project. It reports every supported agent, the directory its
history normally lives in, whether that directory holds history on this
machine, and — inside a project — what that project currently syncs from. That
is enough to put the choice to someone before setting it.
--set replaces the choice outright, taking name or name=/path/to/history
entries. Repeat an agent to give it several directories, exactly as the prompt
allows:
Supported agents
Nothing is installed into the agent itself. Each of these already writes its
session history to disk, and the daemon reads that, so there is no plugin and
nothing to change about how you prompt.
Those are the default locations, and they are a starting point rather than an
assumption. If yours keeps its history somewhere else,
agents will take the
path and check it looks right before accepting it.When to run it
- You start using a new agent and want its sessions archived.
- You want to stop archiving one.
- Your agent stores its history somewhere non-standard.
agents is the one project command that does not start the daemon. It only
edits configuration that a running daemon re-reads on its next tick anyway, so
starting one here would silently undo a daemon stop you meant.