AI agents

Agent diagnosis & recovery

Recovery authority comes from the exact deployment's diagnostics. External agents should never guess whether a mutation is safe.

1. Keep the deployment ID returned by deployment creation or recovery

Keep the deployment ID returned by deployment creation or recovery. Request diagnostics for that exact deployment with the required project context.

2. Read failure ownership, disposition, recommended action, and automaticMutationAllowed from diagnostics

Read failure ownership, disposition, recommended action, and automaticMutationAllowed from diagnostics. Do not infer recovery authority from logs or prose alone.

3. For source_change_required, the external coding agent must repair customer source and supply a new immutable revision

For source_change_required, the external coding agent must repair customer source and supply a new immutable revision. Deploy Hatch does not modify customer source.

4. For configuration_change_required, perform an authorized trusted configuration write first, then invoke configuration recovery according to the advertised mutation schema

For configuration_change_required, perform an authorized trusted configuration write first, then invoke configuration recovery according to the advertised mutation schema.

5. For platform_failure, invoke bounded platform recovery only when diagnostics explicitly allow automatic mutation

For platform_failure, invoke bounded platform recovery only when diagnostics explicitly allow automatic mutation. Platform recovery preserves the revision required by the contract.

6. For user_input or any diagnostic where automatic mutation is false, stop or await the user

For user_input or any diagnostic where automatic mutation is false, stop or await the user. Never infer missing secrets or convert a deliberate human stop into an automatic retry.

7. Honor recoveryLimits and idempotency

Honor recoveryLimits and idempotency. Replaying the same logical recovery uses the same key; a new recovery action uses a new key. Stop when the advertised budget is exhausted.

8. After recovery, observe the newly returned deployment ID as a new exact deployment

After recovery, observe the newly returned deployment ID as a new exact deployment. Success still requires the advertised success state plus a healthy machine health signal.