Skip to content

Exit Codes

tyc follows the conventional “0 = success, non-zero = failure” pattern. Specific values:

CodeMeaning
0Success.
1Compile-time or run-time failure — at least one error-severity diagnostic, a tyc fmt --check that would reformat, an unknown tyc explain code, a missing file or required tool (e.g. uv not installed for tyc add), or a program that exited non-zero under tyc run.
2Invocation error — invalid arguments or an unknown subcommand (reported by the argument parser).
130Interrupted (Ctrl-C / SIGINT).

Per-command notes

Command0 meansNon-zero means
tyc checkNo errors.1 if any error-severity diagnostic, the input is invalid, or there was nothing to check (no .ty files under the paths); 2 if the command line is malformed.
tyc check --stubsNo drift.1 if any tyc::stub_mismatch at error severity (the stub-check default).
tyc buildBuild succeeded.1 if any error-severity diagnostic stops emission.
tyc fmtNo changes / changes written.1 (with --check) if any file would change.
tyc runScript exited 0.Propagates the script’s exit code verbatim.
tyc replClean exit.130 on Ctrl-C. With stdin piped (a script fed in), 1 if any snippet failed to compile or raised.
tyc debugDebugger exited 0.Whatever the debugger exits with.
tyc traceTraceback remapped.1 if the file is unreadable / not a valid traceback.
tyc profileInstrumented build written.1 if the build or the instrumentation failed. (tyc profile does not run the program — you do, and the profile is written on its exit.)
tyc migrateWrote .ty.1 if the input is missing or unreadable. --check is a preview to stdout and exits 0 whenever the migration itself succeeds.
tyc tyty returned 0.Propagates ty’s exit code.
tyc stubtestmypy.stubtest returned 0.Propagates mypy’s exit code.
tyc add / remove / syncManifest updated and uv sync succeeded.1 if uv missing; non-zero from uv on resolution failure.
tyc lspThe client sent shutdown before exit.1 when the client sends exit without shutdown (the LSP spec’s rule) or closes stdin without it.

Severity-to-exit-code mapping

[strictness] keys control whether a finding is error, warn, or off. Only error-severity findings change the exit code.

[strictness]
unused-import = "warn" # surfaces but doesn't fail CI
exhaustive-match = "error" # fails CI

To gate CI on warnings, raise the relevant key to "error" — there is no --quiet switch to filter output with.

Where next