Errors and recovery
Technical failures throw IntentError rather than returning truncated candidates or infrastructure failures as normal success. Field issues remain in a normal result's issues.
If there is no result, check for an exception. If the result lacks an order ID, inspect fieldResults and issues first. Timeout, authentication failure, and missing user information need different recovery actions. If Codex cannot start or has no tools, begin with registration diagnostics.
Recovery is identify code/issue → repair input/configuration → make an explicit new call → inspect the new result. It is not automatic retry. See MCP envelopes.
Semantic issue codes include AMBIGUOUS_REFERENCE, INTENT_INFORMATION_MISSING, CONSTRAINT_CONFLICT, RELATION_CONFLICT, CONTEXT_CONFLICT, CONTEXT_INCOMPLETE, UNCONFIRMED_INFERENCE. Field codes include FIELD_REQUIRED_MISSING, FIELD_APPLICABILITY_UNKNOWN, FIELD_CARDINALITY_MISMATCH, FIELD_VALUE_INVALID, FIELD_DEPENDENCY_MISSING, FIELD_VALIDATION_UNDETERMINED, FIELD_INVALIDATED.
Recover at the right layer
Ambiguity, missing fields, and invalid values are usually normal interpretation issues, not transport failures.
Runtime does not perform these recovery actions for you. Host format correction is based on explicit feedback; missing knowledge, unknown fields, and business authorization are separate.
Serialization includes name/code/message/stage and safe details; cause is non-enumerable. Standard technical messages are generic English without original input or keys. MCP technical failures return isError=true and text {error:...}, with no structuredContent or partialResult.
Preserve prior results and original messages. Failure does not clear application state. The caller decides technical retry and handles out-of-order requests with its own revision. Unknown fields do not trigger automatic fact generation.
This is a caller helper, not an SDK method; the caller owns Intent lifetime. PROCESSING_INCOMPLETE appears only in an established technical failure's partialResult; truncated text is not a normal result. toJSON omits partialResult by default, since complete results can contain original material. Use serialize options explicitly when needed; see IntentError.