> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tokenfactory.nebius.com/llms.txt
> Use this file to discover all available pages before exploring further.

# show - Inspect an operation

<Note>
  **`contree show` is a top-level shortcut for [operation show](./operation) (`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).

  See the [operation - Manage operations](./operation) page for the full description.
</Note>

Display the full result of one or more operations, including stdout
and stderr from sandbox execution.

## Examples

```bash theme={null}
# Show a single operation
contree show 3f2a7b...

# Show multiple operations in one call
contree 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 tip
contree show @+1          # the next operation forward (latest child)
# Git-style HEAD notation, equivalent to @ and @-N
contree show HEAD         # current tip operation
contree show HEAD~        # one step back (shorthand for HEAD~1)
contree show HEAD~3       # three steps back from the tip

# JSON output for scripting
contree -f json show 3f2a7b...

# Show result of a detached run
contree run -d -- make test
contree show UUID
```

## Help output

<div className="contree-terminal" style={{"border":"1px solid rgba(255,255,255,0.15)","borderRadius":8,"overflow":"hidden","margin":"1rem 0"}}><div style={{"background":"#292929","height":24,"display":"flex","alignItems":"center","padding":"0 12px","position":"relative"}}><div style={{"display":"flex","alignItems":"center","flexShrink":0}}><span style={{"display":"inline-block","width":10,"height":10,"borderRadius":"50%","background":"#ff5f57","marginRight":6}} /><span style={{"display":"inline-block","width":10,"height":10,"borderRadius":"50%","background":"#febc2e","marginRight":6}} /><span style={{"display":"inline-block","width":10,"height":10,"borderRadius":"50%","background":"#28c840"}} /></div><div style={{"position":"absolute","left":0,"right":0,"textAlign":"center","fontFamily":"-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif","fontWeight":"bold","color":"#999"}}>\$ contree show --help</div></div><pre style={{"margin":0,"borderRadius":0,"padding":"8px 10px","background":"#1e1e1e","overflowX":"auto"}}><code style={{"fontFamily":"JetBrains Mono, SF Mono, SFMono-Regular, Menlo, Monaco, Cascadia Mono, Segoe UI Mono, Roboto Mono, Oxygen Mono, Ubuntu Monospace, Source Code Pro, Fira Mono, Droid Sans Mono, Consolas, Courier New, monospace","color":"#c5c8c6","whiteSpace":"pre-wrap"}}><span style={{"color":"#61afef","fontWeight":"bold"}}>usage: </span><span style={{"color":"#c678dd","fontWeight":"bold"}}>contree show</span><span style={{"color":"#c5c8c6"}}> \[</span><span style={{"color":"#98c379"}}>-h</span><span style={{"color":"#c5c8c6"}}>] \[</span><span style={{"color":"#56b6c2"}}>--raw</span><span style={{"color":"#c5c8c6"}}>] </span><span style={{"color":"#98c379"}}>UUID\_OR\_REF \[UUID\_OR\_REF ...]</span><br /><br /><span style={{"color":"#c5c8c6"}}>Manage operations (list, inspect, cancel).</span><br /><br /><span style={{"color":"#c5c8c6"}}>Aggregates ps/show/kill under a single namespace, and adds multi-UUID</span><br /><span style={{"color":"#c5c8c6"}}>support to \`\`show\`\` and \`\`cancel\`\` so several operations can be acted</span><br /><span style={{"color":"#c5c8c6"}}>on in one invocation.</span><br /><br /><span style={{"color":"#c5c8c6"}}>Subcommands:</span><br /><span style={{"color":"#c5c8c6"}}>  list (ls)             List operations. \`\`contree ps\`\` is an alias.</span><br /><span style={{"color":"#c5c8c6"}}>  show UUID \[UUID...]   Show one or more operation results.</span><br /><span style={{"color":"#c5c8c6"}}>  cancel UUID \[UUID...] Cancel one or more operations (or --all).</span><br /><br /><span style={{"color":"#61afef","fontWeight":"bold"}}>positional arguments:</span><br /><span style={{"color":"#c5c8c6"}}>  </span><span style={{"color":"#98c379","fontWeight":"bold"}}>UUID\_OR\_REF</span><span style={{"color":"#c5c8c6"}}>  Operations to inspect. Accepts UUIDs and session-history references: @ or HEAD for</span><br /><span style={{"color":"#c5c8c6"}}>               the active branch tip, @N for an absolute history id, @-N or HEAD\~N for N steps</span><br /><span style={{"color":"#c5c8c6"}}>               back, @+N for N steps forward.</span><br /><br /><span style={{"color":"#61afef","fontWeight":"bold"}}>options:</span><br /><span style={{"color":"#c5c8c6"}}>  </span><span style={{"color":"#98c379","fontWeight":"bold"}}>-h</span><span style={{"color":"#c5c8c6"}}>, </span><span style={{"color":"#56b6c2","fontWeight":"bold"}}>--help</span><span style={{"color":"#c5c8c6"}}>   show this help message and exit</span><br /><span style={{"color":"#c5c8c6"}}>  </span><span style={{"color":"#56b6c2","fontWeight":"bold"}}>--raw</span><span style={{"color":"#c5c8c6"}}>        Print each operation's full server payload as JSONL (one JSON object per line) to</span><br /><span style={{"color":"#c5c8c6"}}>               stdout, verbatim. Skips formatter routing and derived columns; streams cleanly into</span><br /><span style={{"color":"#c5c8c6"}}>               \`jq -c\`. Useful for debugging or for fields the table view omits.</span><br /><br /><span style={{"color":"#c5c8c6"}}>for coding agents:</span><br /><span style={{"color":"#c5c8c6"}}>  list/show are read-only; cancel mutates remote state</span><br /><span style={{"color":"#c5c8c6"}}>  show and cancel accept multiple UUIDs in one invocation</span><br /><span style={{"color":"#c5c8c6"}}>  show supports @N session-history references inherited from \`contree show\`</span><br /><br /><span style={{"color":"#c5c8c6"}}>agent note:</span><br /><span style={{"color":"#c5c8c6"}}>  Before using this command in an automated workflow, read:</span><br /><span style={{"color":"#c5c8c6"}}>    contree agent</span></code></pre></div>

## Output

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`)
* **image** – resulting image UUID from `result.image`
* **tag** – image tag from `result.tag`
* **stdout / stderr** – sandbox output, decoded (for `default`,
  `json`, and `json-pretty` formats)

`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` for the full server payload, or `-f json` to keep the
flat structured row.

Pass `--raw` to skip all of the above and print each operation’s
full server JSON payload as JSONL (one object per line) to stdout,
verbatim. 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.

## See also

* [ps - List activity](./ps) – list operations to find UUIDs
* [operation - Manage operations](./operation) – multi-UUID variant: `contree op show UUID1 UUID2 ...`
* [run - Execute a command in the sandbox](./run) – the command that creates operations
