Output and exit codes

tx0 check --format F picks the format: human (the default), agent, json or sarif.

All docs pages

Formats

human
each finding with its code, the part in question underlined and a note; a summary line at the end
agent
for coding agents: a summary line with the gate first, then the findings grouped by file, each with its id, the source line and its fix as a diff; at most 50 findings unless --max-findings says otherwise
json
one finding per line, with its rule, range, message, notes and fix
sarif
SARIF (Static Analysis Results Interchange Format) for code scanning services

The agent format, after a coding agent's edit:

$ tx0 check --changed --format agent
tx0: 1 finding (1 warning) in 1 file; gate failed: findings 1 > 0
jobs/queue.py
  HQ4Y8YG86 12:12 warning tx0/python:is-literal `is` compares identity; use `==` to compare with the int `0`
    12 |         if len(self.items) is 0:
       |            ^^^^^^^^^^^^^^^^^^^^
    note: whether equal values are the same object depends on the interpreter
    fix (unsafe): write `==`
    @@ -12 +12 @@
    -        if len(self.items) is 0:
    +        if len(self.items) == 0:
next: tx0 fix --finding ID | tx0 explain ID | tx0 suppress ID --reason TEXT
exit 1

Filters

--level L shows only findings of level L and above. --tier T uses another tier. --max-findings N shows at most N findings; 0 shows all.

Exit codes

CodeMeaning
0the gate passes
1the reported findings fail the gate
2a usage or configuration error
3tx0 could not run

tx0 hook differs: it exits with 2 when it reports findings, so that the agent reads them, and with 1 when it fails.