For AI agents and LLMs: a machine-readable index is available at llms.txt. A plain-Markdown version of any documentation page is available by appending .md to its URL.
Skip to main content

Rook Flags, Variables, Exit Codes, and Keys

Use this page for cross-command behavior. Run rook help <command> for command-specific options.

Structured Output and Progress

FlagBehavior
--jsonWrites one machine-readable object to standard output. Human explanation moves to standard error so 2>&1 still shows the reasoning. Failures emit an object shaped like {"ok": false, "error": "..."}.
--verboseWrites detailed human progress to standard error, including role activity, tool calls, and credit use.
--yesRuns the current command without interactive tool approval and writes no persistent permission.
--allow <rule>Adds a reviewed permission rule for the current process; repeat the flag for several rules.

Only use a flag where rook help <command> lists it.

Exit Codes

CodeMeaning
0The operation ran and nothing was wrong.
1Rook could not test the agent, such as an invocation error or provider refusal.
2The tested agent failed or was compromised by an adversarial scenario.
3The process is not signed in.
4The account is out of budget.

Codes 1 and 2 are deliberately distinct. Both may stop a build, but only 2 is a finding about the agent. Unable to Verify does not fail a build merely because the harness lacked evidence.

User-Configured Environment Variables

VariableEffect
ROOK_HOMECredentials, environment values, history, and local state. Default: ~/.testmuai/rook.
ROOK_ENVDeployment selection. Public Homebrew, npm, and shell packages default to prod.
ROOK_API_URLOverrides the versioned Rook API base URL.
ROOK_CONTROLLER_URLOverrides the controller base URL.
ROOK_AUTH_BASE_URL / AUTH_URLOverrides the authentication base URL.
ROOK_USER_AUTH_URL / USER_AUTH_URLSupplies a full user-auth endpoint rather than a base.
ROOK_SPRITEControls boot animation; --no-animation disables it for one launch.

The public shell installer accepts --version and --dir command-line options. It does not require a GitHub token or use installer-specific ROOK_* variables. See Install Rook.

Hook Context Variables

Rook sets these for profile hooks:

VariableMeaning
ROOK_HOOKprepare, open, execute, close, or collect
ROOK_RUN_IDCurrent run
ROOK_SCENARIO_IDCurrent scenario
ROOK_SESSIONStable Rook session for the scenario
ROOK_TURNCurrent turn number
ROOK_CONVERSATIONTarget conversation handle returned by the hook
ROOK_STATE_DIRState directory for the scenario lifecycle
ROOK_WORKSPACEAbsolute workspace path
ROOK_PROJECTActive project ID
ROOK_AGENTActive local agent ID

Rook-owned values override conflicting hook configuration. See Profiles and Hooks for phase availability.

Interactive Keys

KeyBehavior
TabAccept the highlighted completion or inline suggestion.
↑ / ↓Move through completion results, or command history when no menu is open.
← / →Move the caret; with Option/Alt, move by word.
EscClose a menu; clear an empty line; discard queued work and then interrupt a running command; decline a prompt.
Ctrl-A / Ctrl-EMove to the beginning or end of the line.
Ctrl-B / Ctrl-FMove back or forward one character.
Ctrl-U / Ctrl-KDelete before or after the caret.
Ctrl-WDelete the previous word.
Ctrl-CAbandon the current line.
Ctrl-NCreate a project from the project picker.
j / kMove down or up in a choice list.
SpaceToggle an item in a multi-select list.
aSelect every item in a multi-select list.
/exit or /quitLeave the interactive session.

Defaults

SettingDefault
Generated classesfunctional,adversarial
Scenarios per model call4; larger requests fan out across writers
Scenario concurrencyProfile value, otherwise 1; allowed range 1–8
prepare timeout60 seconds
open timeout30 seconds
execute timeout300 seconds
close timeout30 seconds, with a 5-second floor
collect timeout120 seconds
Consecutive transport failures before halt3
Interactive history100 lines

Headless Detection

Rook refuses uncovered prompts instead of hanging when --yes is present, standard input is not a TTY, or a supported runner variable exists. The presence of CI, even with the string value false, still identifies a pipeline environment.

Test across 3000+ combinations of browsers, real devices & OS.

×
Schedule Your Personal Demo
Book Demo

Help and Support

Related Articles