Sessions

fx saves conversations in ~/.fx/sessions/. Start fx for a new conversation, or use fx -c to reopen the one remembered for the current workspace.

Resume a conversation

What you want to doCommand
Continue the remembered conversationfx -c
Choose a saved conversationfx -r or fx --resume
Resume the latest conversation in this workspacefx -r last
Resume a conversation by IDfx -r <session-id>
Resume and send a first promptfx -c "<prompt>" or fx -r <session-id> "<prompt>"

fx session resume last and fx session resume <session-id> work the same way as fx -r last and fx -r <session-id>.

fx -r and /resume open a picker of this workspace's conversations, newest first. Type to search all of them, not only the ones shown, and press tab to switch between this workspace and all workspaces.

The remembered conversation and the latest one usually match. They differ when another session receives activity without becoming the selected conversation, such as through fx ask --resume.

You can resume a session from another workspace with its ID. fx then associates it with the workspace where you opened it.

A resumed conversation shows the turns since its latest context compaction. If no turn has run since that compaction, it shows the turns before it. Earlier turns are in Full detail.

If the session was one of several instances, resuming it brings back the whole group.

Find a session

In the shell, /status opens a panel below the prompt. Its first line shows the open conversation's ID and whether it's saved yet. A new conversation is saved when its first prompt starts, and fx --resume <session-id> opens it from then on. A fork is saved as soon as you make it. Press Esc to close the panel; it leaves nothing in the conversation. When you quit a saved conversation, fx prints Resume this session with: and, on the line below it, fx --resume <session-id>. If fx can't save sessions, the panel's session line shows none.

List conversations in the current workspace:

$fx sessions

Use fx sessions --all to include other workspaces. To inspect a saved conversation and its history, run:

$fx session <session-id> --json

Without --json, fx session shows control characters in saved text, such as a terminal escape sequence, as visible escapes like \x1b, so saved text can't change your terminal. --json returns the text as it was saved.

fx ask can continue a saved conversation without opening the shell:

$fx ask --resume last "continue with the tests"

See what's running

List the conversations an fx process has open right now, in this workspace:

$fx sessions --live

Each conversation is a row with its title, whether a turn is running (working) or not (idle), how long ago it changed, and its session id, with working conversations first. A conversation whose log fx can't read shows unknown. Its subagents are listed by name in a tree below it, each with its own state, and a subagent's own subagents below that. The model shows once at the top, and a model column appears when a conversation saved a different one. Add --all to include other workspaces, and --json for output a script or another agent can read. The list holds every live conversation at once, so --live doesn't take --limit or --cursor. Several instances in one fx each appear as their own conversation. A conversation leaves the list as soon as its process ends, even when the process crashes, and a subagent closed for good isn't listed. The model shown is the one saved with the conversation, so a model chosen for a single run, such as through FX_MODEL, doesn't appear there.

To read the last turns of a conversation, even one another fx has open, run:

$fx session <session-id> --tail 3

To read a subagent, add its name to the session id, such as <session-id>/reviewer; a subagent's own subagent is <session-id>/lead/helper. --tail shows finished turns, so a turn still running isn't included yet.

Fork a conversation

Run /fork to start a new conversation from an earlier point in the current one. Choose a prompt from the list, and fx creates a conversation with the history before that prompt, switches to it, and puts the prompt in the composer so you can edit it before sending. The original conversation stays as it was. /fork works in a saved conversation once the current response finishes.

If the conversation had subagents at the chosen prompt, fx asks whether to bring them into the fork. Press enter or y to copy them all, or n or esc to fork without them. Each copy keeps its subagent's history up to that prompt, and work it was doing there ends in the copy as cancelled. fx doesn't offer subagents started after that prompt or closed for good, and it doesn't copy a subagent's own subagents. The originals stay in the original conversation, and forking stops the work they're running, as any switch to another conversation does.

Session titles

fx creates a short title from the first usable prompt so conversations are easier to find. An untitled conversation can still receive a title after you resume it. Run /rename <title> to set a title yourself. Turn automatic titles off with session_titles: false in your profile settings or through /settings. See Usage and costs for the separate model request it uses.

Recover interrupted work

fx saves each step of a response as it finishes. When a provider or the network fails, fx keeps retrying until the request goes through, and the status line shows what failed, the attempt, and a countdown to the next try. Once fx sends the request again, the status line goes back to Thinking while the model works. Press escape twice to stop it. If a response breaks off partway, fx starts it over. The new answer replaces the partial one, or appears after ↻ Restarted the answer when the partial one can't be replaced, such as after it scrolls out of view.

In the shell, a request that only you can continue, such as one out of credits, waits for you instead of retrying. See fx asks you to act during a response. When a turn ends on an error that fx can't retry, it keeps the prompt, any partial reply, and the tool calls that finished, so a follow-up prompt continues from that work, including after you resume the session.

When the network drops during a response, fx notices that the connection is dead within about 5 seconds of the network returning and retries the request. If your computer joins another network or gets a new address, fx notices within about a second. During a longer outage, the status line shows Connection lost 45 seconds after the last data arrived, and fx keeps retrying. A model that thinks for minutes without sending text keeps its connection, and an answer isn't cut short when your computer sleeps.

If fx or its terminal closes during a response, run fx -c. fx sends the interrupted request again on its own and shows Resuming the interrupted request. A tool that was running when fx stopped may have partly run, so fx tells the model to check what finished and rerun only what is safe. Plain fx shows Interrupted turn · /resume to continue when the conversation fx -c opens has an unfinished turn. Pick that conversation in /resume, and fx sends the interrupted request again, as fx -c would.

fx asks before sending the request again in two cases. Press enter to send it, or escape to end it:

Status lineWhen
This request crashed fx twicefx stopped unexpectedly twice while the request was in flight.
Interrupted more than a day agoThe request was interrupted more than 24 hours ago.

Closing the terminal window counts as a clean close, not a crash.

This covers fx and its terminal stopping, not the computer. A power cut or a crash of the whole computer can lose the turn in progress, because fx doesn't wait for the disk to confirm each save before it sends a request.

Token usage is saved with each model reply and continues counting after resume; subagent usage stays in each subagent's own session.

fx ask doesn't send an interrupted request again on its own. Send continue to pick up from the steps that finished:

$fx ask --resume last "continue"

If a saved conversation cannot open, fx doctor names it and the command that recovers it. fx session recover <session-id> copies the conversation up to the damage into a new session and leaves the original unchanged.

Sessions from earlier versions

fx converts a conversation saved by an earlier version the first time you open it, together with its subagent sessions. fx -c, fx -r, fx session resume, /resume, fx ask --resume, and ACP session/load all convert it. To convert every saved conversation at once:

$fx sessions convert

Conversion carries saved permission rules, ACP prompts and tool identities, terminal state, and side files. fx removes a conversation's earlier files only after its converted copy is saved. When a file can't be carried across, such as a side file over the per-file limit or terminal state the new format can't hold, fx names it and keeps the conversation's earlier folder, so the file stays where it was, and fx doctor counts these folders. Earlier versions of fx read only the earlier format by default, so they don't show converted conversations. Back up ~/.fx/sessions/ before converting if you might go back to one.

A session that can't be converted keeps its original files, and fx names the file and the reason. fx doctor lists these sessions with the command for each one, and fx session recover <session-id> copies what can be read into a new session. fx sessions convert --json reports skipped sessions and each file that couldn't be carried across, with its cause. The command exits with status 1 when it skips a session.

A subagent session that no version of fx opens also stays as it is, such as a subagent's own subagent from a version before 0.0.8. fx sessions convert lists each one under kept with the reason, fx doctor names it too, and the conversation it belongs to converts without it.

Compact long sessions

fx compacts older conversation history automatically when a model request reaches its context threshold. Run /compact to do it between prompts:

$/compact

See Context compaction for the exact threshold, retained history, and model requests.