Skip to main content
The FTL interactive shell provides a persistent session where you can issue follow-up instructions to the agent without cold-booting between tasks.

Starting the Shell

Launch the interactive shell from your project directory:
You must run ftl init in your project before using the interactive shell.

Shell Prompt States

The shell has two prompt states:
No active session. Type a task to start a new session.

Basic Workflow

1

Start Shell

Output:
2

Issue Task

Type a task description to start a new session:
FTL snapshots your project, boots the sandbox, and runs the agent.
3

Review Changes

Once the agent completes, the session becomes active:
4

Follow-up Instructions

Continue the conversation with follow-up tasks:
The agent continues in the same container with full context.
5

Merge or Reject

When satisfied, merge the changes:
Or reject to discard all changes:

Session Commands

These commands are available when a session is active:

diff

Show all changes since the snapshot:
Displays a unified diff of all modified files.

test

Re-run tests manually:
Executes the adversarial tests generated for this session.

merge

Review and merge changes to your project:
FTL displays the diff and prompts for approval:

reject

Discard all changes and end the session:
The sandbox state is discarded and the prompt returns to ftl>.

Snapshot Commands

These commands are available at any time:

list

List snapshots for the current project:
Output:

list all

List snapshots for all projects:

restore

Restore a previous snapshot:
FTL prompts for confirmation before restoring:

Example Session

Here’s a complete interactive session:

Session Lifecycle

Persistent Container

The shell uses a persistent container per project:

Follow-up Context

When you issue a follow-up instruction:
1

Same Container

The agent runs in the same container with all previous context
2

Same Conversation

Conversation history in /home/ftl/.claude/ is preserved
3

No Snapshot

FTL does not create a new snapshot for follow-ups
4

Cumulative Diff

The diff shows all changes since the original snapshot

Exiting the Shell

Exit the shell with any of these:
If you exit with an active session, FTL automatically rejects all changes to prevent accidental merges.

Shell Implementation

The shell is implemented in ftl/cli.py:
ftl/cli.py

Tips

Instead of crafting perfect initial instructions, start with a basic task and refine with follow-ups:
Always run diff before merge to review all accumulated changes:
Run list to see all snapshots for the current project:
Use restore <id> if you need to revert to a previous state.
Run tests manually after each follow-up to catch issues early: