paimon

Reference

Every switch, command, key, tool and setting. The guide explains when to reach for them.

Launch switches

paimon [switches] starts the UI, or runs one prompt with -p.

switcheffect
-r, --resume [ID]Resume a session by id prefix; with no id, pick one from a list.
-c, --continueResume the most recent session in this directory.
--model PROVIDER:NAMEThe model for this run only. The configured one is untouched.
--thinking LEVELThinking effort for this run only: off, minimal, low, medium, high, xhigh or max.
--mode MODEPermission mode: read, auto or yolo (the default).
--strictHold every shell command, the clearly read-only ones included.
--skill PATHLoad skills from this SKILL.md or directory too. Repeatable.
--no-skillsSkip the default skill locations. --skill paths still load.
--no-web-searchDo not give the model the web_search tool.
--no-code-modeDo not give the model the run_code tool.
--webServe the UI in a browser instead of the terminal.
--port NPort for --web. Default 8000.
--textual-debugGive the agent tools to inspect and change its own live UI. See below.

With -p only

switcheffect
-p, --print [PROMPT]Run one prompt without the UI and exit. With no value the prompt is read from stdin; with both, the piped text is given to the model along with the prompt.
--output-format FORMATtext (the default), json for one event per line, or result for the final result alone.
--timeout SECSGive up after this many seconds, with exit code 124.
--max-tool-calls NStop a turn before its N+1th tool call, with exit code 4. Each agent it starts gets the same budget.
--append-system-prompt TEXTAdd text, such as a role, to the end of a new session's system prompt. It is saved with the session, so it cannot be combined with -c or -r.

Without -p, a stdin that is not a terminal is also read as a prompt: echo "fix the build" | paimon runs headless.

Commands

commandwhat it does
paimon status Show login state and configuration. Exits 0 when the configured model can be built with credentials that resolve, 1 otherwise, without a network request. --json prints one JSON object.
paimon login [PROVIDER] Log in to a provider without the UI. --api-key-env VAR or --api-key-stdin supplies the key, --api-base URL overrides the endpoint, and --model PROVIDER:NAME logs in to that model's provider and makes it the default. --force sets an unreadable config aside and starts fresh. --accept-risk skips the confirmation for antigravity.
paimon model PROVIDER:NAME Set the default model. Credentials are not touched.
paimon sessions List the resumable sessions in this directory, newest first. --json prints a JSON array.
paimon log [ID] Show a session's event log, one line per event, each prefixed with its seq. --turns N, --tail N and --after SEQ narrow it, --full shows whole contents, and --json prints the raw records.
paimon install-skill Install the skill that teaches another coding agent to drive Paimon. --target claude (the default) or codex, or --dest DIR for anywhere else.

Keys

keyaction
EnterSend the prompt.
Shift+Enter, Ctrl+JNew line in the prompt.
Up, DownOn the first or last line of the prompt, walk through earlier prompts.
Ctrl+VPaste, including an image from the clipboard.
/In an empty prompt, open the command palette.
!, !!At the start of a line, run it in a shell. !! does not show the output to the model.
EscInterrupt the current turn.
Shift+TabCycle the permission mode.
Ctrl+POpen the command palette.
Ctrl+TOpen another session in a new pane. Up to eight panes.
Ctrl+WClose the current pane.
Ctrl+PageUp, Ctrl+PageDownPrevious and next pane.
Ctrl+GGo to a pane that is waiting on you.
Ctrl+LReturn focus to the pane's input or pending question.
Ctrl+CQuit.

Command palette

On top of Textual's own entries, such as Change theme: Log in to a provider, Switch model, Thinking effort, Toggle thinking display, Toggle idle recap, Compact context, New session, Fork session, Resume session, New pane, Close pane, and one entry per skill.

Tools

What the model can call. The last column says what holds a call back outside yolo mode, where nothing does.

toolwhat it doesheld when
read_fileRead a text file with line numbers, or look at an image.outside the working directory
globFind files by pattern, newest first.outside the working directory
grepSearch file contents for a regular expression.outside the working directory
write_fileCreate or overwrite a file.always in read; in auto outside the working directory or inside .git
edit_fileReplace one exact substring in a file.as write_file
shellRun a command and return its output.unless the command is recognized as read-only
run_backgroundStart a long-running command in a tab of its own.always
read_jobRead what a background command has printed.never
stop_jobStop an agent or a background command.never
spawn_agentStart another agent working in parallel. Up to four at a time.never
list_modelsList the models an agent can be started on.never
web_searchSearch the web and return titles, URLs and snippets.never
run_codeRun a sandboxed Python script that calls the other tools.each call it makes is held as above
write_todosKeep a task list for multi-step work.never
ask_userAsk the user one question and wait.never
search_historySearch the session's full log, including what compaction summarized away.never
read_historyRead records from that log.never

A held call is refused in read mode and put to the reviewer in auto mode. Under -p the model has no ask_user and no background commands. A subagent has neither, and cannot start agents of its own.

On Windows commands run in Git Bash, found through git on your PATH or the standard install locations. Without Git for Windows they run in cmd.exe, and then none are recognized as read-only.

config.json

Kept in ~/.config/paimon/config.json, written by the first launch, by paimon login and by choices made in the app. Settings marked “by hand” are only ever read.

keydefaultmeaning
modelnoneThe model to run on, as provider:name.
providers{}Credentials by provider, each with api_base and api_key. A provider's key is only ever sent to that provider.
thinkingnullThinking effort, or null to leave it to the model. A level a provider lacks becomes the nearest one it has.
show_reasoningfalseShow the model's reasoning as it streams, and print it under -p.
themepaimonThe UI theme.
safe_commandstrueLet clearly read-only commands run in read and auto modes.
review_modelnullThe model auto mode reviews with, as provider:name. By default current models review with their provider's fast tier and the rest with themselves. By hand.
code_modetrueGive the model the run_code tool.
skills[]More skill files or directories. By hand.
recap_enabledtrueOffer a recap when you come back to an idle pane.
recap_idle_seconds300How long a pane sits idle before the recap. By hand.
compaction.enabledtrueSummarize the conversation in place near the context limit.
compaction.reserve_tokens16384Compact once fewer than this many tokens of the window are left.
compaction.keep_recent_tokens20000About how much of the recent conversation is kept as it is.
compaction.context_windownullThe window to assume for a model Paimon does not know.

A setting of the wrong type stops Paimon with a message naming it. The file is never rewritten around a mistake.

Headless output

With --output-format text the answer goes to stdout, and tool calls, refusals and notices go to stderr.

--output-format result prints exactly one JSON object when the run ends:

{"type": "result", "subtype": "success", "is_error": false,
 "session_id": "7fd2c1e8…", "text": "the final answer",
 "denied": 0, "error": null, "log_end": 42}

--output-format json prints one object per line as the run goes. The first is always init and the last is always the same result, even when the run fails before the model is reached.

typefields
initsession_id, model, mode, cwd
text_delta, reasoning_deltatext
tool_useid, name, args
tool_resultid, name, result, denied, status (success, failed, denied or interrupted), detail (such as exit 2); a run_code result adds calls
todostodos
jobtext
compactedtokens_before, tokens_after
compaction_failederror
retryattempt, max_attempts, delay, error
images_rejectedmodel
resultas above

Consumers should ignore types and fields they do not know. Existing fields are only added to, never removed or redefined.

Exit codes

codemeaning
0Success.
1Error.
2Bad usage.
4Hit --max-tool-calls.
124Hit --timeout.
130Interrupted.

The session is saved in every case, and can be resumed to let it finish.

Environment and files

variableeffect
PAIMON_CONFIG_HOMEWhere config.json and the global skills live. Default ~/.config/paimon.
PAIMON_DATA_HOMEWhere sessions live. Default $XDG_DATA_HOME/paimon, or ~/.local/share/paimon.
PAIMON_NO_TELEMETRY, DO_NOT_TRACKSet either to turn telemetry off.
NO_COLORNo colour in -p text output.
TEXTUAL_ANIMATIONS=noneHold the stars and the spinner still.

A provider with no stored key falls back to its own environment variable, such as ANTHROPIC_API_KEY or KILO_API_KEY. Sessions are JSONL files under sessions/ in the data directory.

Telemetry

Each launch sends one anonymous event to Google Analytics: a random install id, the launch mode, the version, the OS name, the language from LC_ALL or LANG, whether this is the first launch, and the configured provider and model name. Nothing from your sessions, prompts, files or credentials is included.

Debugging the UI

paimon --textual-debug, which also works with --web, is for when Paimon needs to diagnose its own layout or styling. The model then gets five more tools, scoped to the live UI process:

textual_exec is unrestricted Python inside the process and can change any Textual or Paimon state. Use this option only with prompts you trust. Live changes last until exit; once a fix is confirmed, ask Paimon to edit the source.