Skip to main content

Overview

The ftl logs command displays a session audit log showing the history of all FTL coding sessions. Each log entry captures the task description, event type, snapshot ID, and result (merged/rejected).

Usage

Options

integer
default:"20"
Number of log entries to show (most recent N entries)
boolean
default:"false"
Show logs for all projects instead of just the current project

Examples

View Recent Logs

Limit to 10 Entries

View All Projects

No Logs Found

Log Entry Fields

Time

Timestamp when the session event occurred, formatted as MM-DD HH:MM.

Event

The type of session event. Common values:
  • complete - Task completed successfully
  • start - Task started
  • error - Task encountered an error

Task

The task description provided to ftl code. Truncated to 50 characters in the table.

Snapshot

The snapshot ID created for this session. Use this ID with ftl snapshots or the FTL shell to restore changes.

Result

What happened to the snapshot:
  • merged (green) - Changes were merged into the working directory
  • rejected (red) - Changes were rejected and discarded
  • Empty - Session still active or no decision made yet

Log Storage

Local Mode

Logs are stored in ~/.ftl/sessions.log as JSON lines:

AWS Mode

When configured with ftl config --aws, logs are sent to CloudWatch Logs:

Filtering by Project

By default, ftl logs shows only logs for the current project (detected via .ftlconfig). Use --all to see logs across all projects.

Use Cases

Review Recent Activity

Quickly see the last 5 tasks and their outcomes.

Audit Trail

Export a comprehensive audit trail for compliance or review.

Find Snapshot ID

Locate the snapshot ID for a specific task to restore it.

Track Rejection Rate

See which tasks were rejected to understand patterns.

Troubleshooting

No Logs File

If you’ve never run ftl code, the log file won’t exist:
Solution: Run your first task with ftl code "your task".

Logs from Other Projects

If you don’t see expected logs, they might be filtered by project:

Log Rotation

FTL does not automatically rotate or clean up log files. To manage log size:
  • Manually truncate or archive ~/.ftl/sessions.log
  • In AWS mode, configure CloudWatch log retention policies

See Also