pub async fn start(
store: &Chats,
cfg: &Config,
repo: PathBuf,
idea: &str,
agent: Option<&str>,
from: Option<&Chat>,
) -> Result<Chat>Expand description
Open a conversation and take the first agent turn.
The record is written to disk before the agent is invoked, so an agent that fails on the very first turn still leaves the operator a conversation they can look at, retry into, or abandon - rather than nothing at all.
agent is resolved by plan::pick, the same policy magi plan uses: an
explicit id wins and is an error rather than a fallback when it is not
runnable, otherwise a claude seat, otherwise the first runnable agent in
roster order. Called rather than copied, because two copies of a preference
order drift and the copy that drifts is the one nobody reads.
from is the conversation this one was derived from, when the operator
asked to continue an existing interview in a different repository (see
derived_background). It is read, never written: the source chat’s
status, turns and draft are left exactly as they were.