REPL Keybindings & Interaction
Keyboard shortcuts, file attachments, smart paste, tool-use approval, and session persistence inside the fwm agent REPL.
The fwm agent REPL is a full-screen TUI with a conversation pane, an
input box, and a status bar showing the current mode. It's designed to
be driven entirely from the keyboard.
Key bindings
| Keys | Action |
|---|---|
Enter | Submit a query, select a menu item, or approve a prompt. |
Esc | Interrupt agent · reject tool-approval · close picker · clear input. |
Ctrl+C | Quit. |
↑ / ↓ | Input history — or move selection in slash/file picker. |
PageUp / PageDown | Scroll the conversation 20 lines at a time. |
Ctrl+A / Home | Cursor to start of input. |
Ctrl+E / End | Cursor to end of input (empty input: scroll to bottom). |
Ctrl+U | Clear input line. |
Ctrl+W | Delete previous word. |
Ctrl+L | Clear the conversation pane. |
| Mouse wheel | Scroll the conversation. |
File attachments with @
Type @ at the start of an empty input to open a file picker. Filter by
typing, navigate with arrows, attach with Enter. Multiple files are
supported; each is truncated at 30 KB with a hint to use read_file for
anything larger.
Smart paste
Bracketed paste prevents premature submission of multi-line content. Long
pastes collapse to a [pasted N characters] placeholder and expand back
when you press Enter.
Tool-use approval
Dangerous tools (edit_file, write_file, run_command, git_commit,
build, flash, run_validation) prompt for approval. Read-only tools
never prompt.
Allow run_command $ west flash ? [Y]es [N]o [A]ccept all| Key | Effect |
|---|---|
Y / Enter | Approve this one call. |
N | Reject and type a reason (the agent sees it). |
A | Approve all remaining calls for this turn. |
Esc | Reject and stop the agent entirely. |
Long-running child processes (builds, flashes, validation shell
commands) are killed along with the agent when you press Esc.
Session persistence
After each turn, conversations are saved to:
~/.fwm/sessions/session_<unix-timestamp>.jsonThe three most recent are kept; older sessions are pruned automatically.
Use /resume to list them or /resume N to reload session N.
To start fresh and skip history altogether:
fwm agent --no-historySee Slash Commands for the full session-management reference.