contree show is a top-level shortcut for operation show (contree op show).Both share one argparse setup and one handler. The top-level show
accepts one or more UUIDs and history references — each entry renders
as its own row. Accepted reference forms:
@, :, or HEAD — the operation at the active branch tip.
@N, :N, bare N — absolute history id.
@-N, :-N, HEAD~N — N steps back from the tip.
HEAD~ — shorthand for HEAD~1.
@+N, :+N — N steps forward from the tip (latest child).
# Show a single operationcontree show 3f2a7b...# Show multiple operations in one callcontree show 3f2a7b... a1b2c3... 9d8e7f...# History references (resolved against the active session)contree show @5 @4 @3# Relative to the active branch tip (like `session rollback`)contree show @-1 # the operation one step back from the tipcontree show @+1 # the next operation forward (latest child)# Git-style HEAD notation, equivalent to @ and @-Ncontree show HEAD # current tip operationcontree show HEAD~ # one step back (shorthand for HEAD~1)contree show HEAD~3 # three steps back from the tip# JSON output for scriptingcontree -o json show 3f2a7b...# Show result of a detached runcontree run -d -- make testcontree show UUID
usage: contree show [-h] [—raw] UUID_OR_REF [UUID_OR_REF …]
Manage operations (list, inspect, cancel).
Aggregates ps/show/kill under a single namespace, and adds multi-UUID support to “show“ and “cancel“ so several operations can be acted on in one invocation.
Subcommands: list (ls) List operations. “contree ps“ is an alias. show UUID [UUID…] Show one or more operation results. cancel UUID [UUID…] Cancel one or more operations (or —all).
positional arguments: UUID_OR_REF Operations to inspect. Accepts UUIDs and session-history references: @ or HEAD for the active branch tip, @N for an absolute history id, @-N or HEAD~N for N steps back, @+N for N steps forward.
options: -h, —help show this help message and exit —raw Print each operation’s JSON payload as JSONL (one object per line) to stdout. Round-trips through the typed operation model, so fields the model doesn’t know about are dropped. Skips formatter routing and derived columns; streams cleanly into `jq -c`. Useful for debugging or for fields the table view omits.
for coding agents: list/show are read-only; cancel mutates remote state show and cancel accept multiple UUIDs in one invocation show supports @N session-history references inherited from `contree show`
agent note: Before using this command in an automated workflow, read: contree agent
The command renders every scalar top-level field the API returns
(typically: uuid, kind, status, created_at,
started_at, finished_at, duration, session_key, …) and
adds these derived fields:
exit_code – the sandbox process exit code (extracted from
metadata.result.state.exit_code)
status is the server’s word: it reflects whether the API ran the
operation to completion, not whether the sandbox process exited with
zero. A SUCCESS row with exit_code=1 means “the API completed the
job; your command returned 1”. error is pinned to the last column.
Nested objects (metadata, result) are dropped from the flat row
– use --raw to keep them, or -o json to keep the flat structured
row.Pass --raw to skip all of the above and print each operation’s
JSON payload as JSONL (one object per line) to stdout. The payload
round-trips through the typed operation model, so fields the model
doesn’t know about are dropped – it’s not the server’s byte-for-byte
response. Streams cleanly into jq -c. Useful for debugging or
pulling fields the table view omits (resources, full metadata, etc.).Timestamps come back from the API in UTC and are converted to the
local timezone for human-readable formatters (default, table,
csv, tsv, plain). The JSON formatters preserve the source
timezone offset.For csv, tsv, and table formats, stdout/stderr are omitted – use
default or json to see sandbox output.