Sessions & Shortcuts

Sessions

puq code saves every session automatically under ~/.puq/agent/sessions/. Use --no-session to run without saving. To revert file changes made by the agent, see Undoing changes.

From the command line

CommandDescription
puq --continueContinue the most recent session
puq --resumeChoose a session from a list
puq --resume <id>Open a session by ID prefix or path
puq --fork <id>Copy a saved session into a new one
puq --from-claude / --from-codexImport a Claude Code or Codex session
puq --export <session.jsonl>Export a session file to HTML
puq shareShare a saved session through an encrypted link

Inside a session

CommandDescription
/newStart a new, empty conversation
/clearClear the conversation context (history stays on disk)
/resumeSwitch to another session
/forkCopy the current session into a new one
/branchGo back to an earlier message and branch from it
/treeMove to another point in the current session
/export [path]Save the session as an HTML file
/shareCreate an encrypted share link
/dumpCopy the session as text to the clipboard
/deleteDelete the current session
/restartRestart puq and continue this session

Working together

Share a live session so others can watch or help from a browser:

CommandDescription
/collabShare with full control
/collab viewShare read-only
/collab statusShow the link and participants
/collab stopStop sharing
/join <link>Join someone else’s session

Keyboard shortcuts

Run /hotkeys to see all shortcuts for your version.

ShortcutAction
EnterSend the message
Ctrl+Enter / Ctrl+QQueue a follow-up while the agent is working
EscStop the current response
Shift+TabCycle approval mode (Manual → Auto-edit → Plan → Yolo)
Alt+Shift+PToggle plan mode
Alt+MOpen the model selector
Alt+PPick a model for this session
Ctrl+P / Shift+Ctrl+PCycle models forward / backward
Ctrl+NCycle thinking level
Ctrl+TShow or hide thinking
Ctrl+OExpand or collapse tool output
Ctrl+RSearch prompt history
Ctrl+GEdit the prompt in your $EDITOR
Ctrl+VPaste (images supported)
F5 or Alt+RRetry the last failed response
Alt+A or Ctrl+SOpen the Agent Hub (subagents)
Ctrl+CClear the prompt (press Up to recover it); twice to exit

Change shortcuts in ~/.puq/agent/keybindings.yml — see Configuration.

On Windows Terminal, Ctrl+V and Ctrl+Enter may be captured by the terminal. Use Alt+V to paste images and Ctrl+Q to queue a follow-up.