Output Modes
Use machine-readable output whenever another program will parse the result:text: human-readable defaultjson: structured scripting outputyaml: structured scripting outputraw: unmodified body/text when available, otherwise a compact one-line serialization of local command datatable: human-readable tabular output
--output json. --output raw is most useful when you explicitly want passthrough text from an upstream response.
Current caveat: tm infer chat --stream, tm infer completions --stream, and tm infer responses --stream only support --output text. For streaming automation, use the SDK or consume the upstream SSE endpoint directly.
Readiness Checks And Exit Codes
For automation, use the readiness commands with--exit-status:
tm auth status --exit-statusfor the local Control Plane token plus gateway credential prerequisitestm infer doctor --exit-statusfor direct gateway inference prerequisitestm doctor --exit-statusfor a stricter combined readiness check
--exit-status, those commands still print useful diagnostics, but they are not strict shell gates.
Timeouts
Global request timeout:--timeoutfor the connect timeout--stream-idle-timeoutfor idle SSE reads
Retries And Rate Limits
Global retry setting:- only idempotent methods are retried automatically:
GET,HEAD,OPTIONS,PUT,DELETE - automatic retries happen for network failures and HTTP
429,500,502,503,504 - when a retryable HTTP response includes
Retry-After, the CLI waits for that server-provided delay before retrying, capped at8s - otherwise backoff is exponential:
0.5s,1s,2s,4s,8smax - non-idempotent
POSTrequests are not retried automatically
tm infer chat uses POST. Setting --max-retries has no effect on inference requests. --max-retries applies to management commands such as tm models list and tm activities list.
Retry-After may be either delta-seconds or an HTTP date; both are honored when present, up to the same 8s maximum delay.
Operational advice:
- if the service is rate-limiting you, reduce concurrency before raising
--max-retries - remember that retries still stop at an
8smaximum delay per attempt, even if the server asks for longer
Pagination Patterns
Control Plane commands use the pagination shape exposed by each endpoint family. Page/size style examples:--output json and pass the next token or page values explicitly rather than scraping table output.
Error Surface
The CLI distinguishes a few failure classes:- usage/config errors: missing required args, invalid UUIDs, invalid timeout values
- HTTP errors: include
HTTP <status>and may includerequest_id - network errors: surfaced as connection or timeout failures
Idempotency And Mutations
Mutation commands such ascreate, deploy, upsert, message, and add do not get automatic retries.
That is intentional: if you need retry logic around non-idempotent operations, add it in your wrapper with explicit safeguards around duplicate effects.
What To Avoid
- do not parse
textortableoutput in CI - do not treat
tm auth status,tm doctor, ortm infer doctoras strict health checks unless you add--exit-status - do not assume
POSTmutations are retried for you - do not set
--max-retriesso high that repeated retryable failures still create unacceptable CI wait time

