/session

Session management.

Sub-command Usage Description
ls /session ls List the active sessions by name
id /session id Show current session’s unique ID
goto /session goto <NAME> Switch to another named session
new /session new <NAME> [model=<MODELNAME>] Create a new named session
usage /session usage Show the token usage/size for the current chat session
save /session save <FILEPATH> Save the current chat session to a JSONL file
load /session load <FILEPATH> [tail=<N>] Load a saved chat session from its JSONL file
reset /session reset [system_prompt_name=<NAME>] Reset and clear the current chat session
push /session push [keep_tools=<YES or NO>] [keep_prompts=<YES or NO>] [keep_history=<YES or NO>] [system_prompt_name=<NAME>] Push the current chat session and fork/branch a new one
pop /session pop [retain=<RETAIN_TYPE>] [replace=<YES or NO>] Restore the previously pushed session
pop_and_transform /session pop_and_transform prefix=<PREFIX> response=<RESPONSE> [replace=<YES or NO>] Transform last response into a synthetic conversation and return to parent session Experimental

ls

Usage: /session ls

List the active sessions by name.

id

Usage: /session id

Show the current session’s unique ID.

goto

Usage: /session goto <NAME>

Switch to another named session.

new

Usage: /session new <NAME> [model=<MODELNAME>]

Create a new named session, with the option to specify a model name, allowing different sessions to use different LLMs.

usage

Usage: /session usage

Show the token usage/size for the current chat session based on the most recent response from the LLM.

save

Usage: /session save <FILEPATH>

Save the current chat session to a JSONL file. The file should not be edited manually. This records current toolsets, tools, and any matching MCP connections.

load

Usage: /session load <FILEPATH> [tail=<N>]

Load a saved chat session from its JSONL file. This clears all active tools and MCP connections, then restores toolsets and re-establishes MCP server connections. You can optionally specify tail=N to display the N most recent chats after loading.

reset

Usage: /session reset [system_prompt_name=<NAME>]

Reset and clear the current chat session including tools and MCP connections and starts a new per config. Optionally, change the system prompt by providing system_prompt_name=NAME.

push

Usage: /session push [keep_tools=<YES or NO>] [keep_prompts=<YES or NO>] [keep_history=<YES or NO>] [system_prompt_name=<NAME>]

Push the current chat session and fork/branch a new one with the same AI model.

  • keep_tools, keep_prompts, keep_history: Specify whether to keep these elements from the current session.
  • system_prompt_name: Optionally, change the system prompt.

pop

Usage: /session pop [retain=<RETAIN_TYPE>] [replace=<YES or NO>]

Restore the previously pushed session.

  • retain: Specify how much history to keep (none, last_full, last_outline, session, or session_outline). If no parameter is given, it defaults to none.
    • last_full retains the entire last conversation including all the turns between user request and assistant response.
    • last_outline retains the user request and assistant response of the last conversation.
    • session retains the entire chat history since this session started or forked.
    • session_outline retains the first user request and the last assistant response of this session.
  • replace: Whether to replace parent chat history (yes or no). Defaults to no.

pop_and_transform

Experimental

Usage: /session pop_and_transform prefix=<PREFIX> response=<RESPONSE> [replace=<YES or NO>]

Transforms the last response into a synthetic conversation by creating a user message with the specified prefix followed by an LLM response message. This synthetic conversation is then appended to the parent session history. Returns you to the last pushed (parent) chat session. Optionally specify if parent history should be replaced using replace=YES or NO.