Alan Docs

Session lifecycle

What each session state means while an agent works, waits, finishes, or stops, and how to recover.

Every message you send starts a turn: the agent works until it finishes, needs you, or is stopped. The status line at the top of each turn shows its progress.

Turn states

you send a messagethe agent asks a questionyou answerthe turn finishesyou stop ityou replyyou replyWorkingWaitingForInputWorkedStopped
LabelMeaning
Working for 25sThe agent is running. A spinner and, when reported, a token count show next to it.
Waiting for inputThe agent asked a question or needs approval. Answer it in the card ("Waiting for your answer") to continue.
Worked for 10sThe turn finished. The line also summarizes the work, for example Ran 2 commands, read 3 files and edited 2 files. Select it to expand every step.
Stopped after 12sYou stopped the turn. Work done until then is kept.
Stopped before it startedThe turn was stopped or failed before the agent began.

A turn in Plan mode ends with a Plan ready for review card. Accept Plan starts a new turn in Agent mode to build it, and the card then reads Plan accepted; Reject Plan marks it Plan rejected.

Sending while the agent works

You can keep typing while a turn runs. Each extra message shows its delivery state:

LabelMeaning
Sending…The message is on its way.
Sent to the running agentThe agent received it during the current turn.
Queued. Runs after the current turnIt starts the next turn automatically.
Runs next. The agent finished before reading itThe turn ended first, so the message starts a new one.
Not sent. The computer was stoppedThe machine went offline. Start it again, then resend.

Where the session runs

A session's turns run on its execution target, which has its own status in the side panel, for example Cloud machine · Ready or a computer that is Online. A cloud machine can be asleep: the transcript shows a placeholder with Wake up. Waking or restarting the machine doesn't change the session; its history stays.

The machine and the turn are separate. A machine that is offline means turns can't run; a turn that is Stopped means that turn ended. See Sandboxes for cloud machine states.

Recover and continue

  • A turn stopped early: reply in the same session to continue from where it stopped.
  • The machine is offline or asleep: choose Wake up, or start the computer, then resend any message marked Not sent.
  • The work changed direction: start a new session so the transcript stays focused, or choose Convert to task in the session header to track it as a task.
  • You need to see what happened: expand the Worked for line to inspect the reported steps. On a task, open Changes to review the working diff.

If a reply is missing, check the delivery label and expand the turn's steps before resending. The agent may already have received your message or changed files.

Next steps

On this page