{"record":{"id":"a0f89edab2be1da2","repo":"hashicorp/terraform","slug":"task-stage-s-awaiting-override","errorCode":null,"errorMessage":"Task Stage '%s' awaiting override.","messagePattern":"Task Stage '(.+?)' awaiting override\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"internal/backend/remote/backend_taskStages.go","lineNumber":47,"sourceCode":"\t\t}\n\t\tstage, err := b.client.TaskStages.Read(ctx.StopContext, stageID, &options)\n\t\tif err != nil {\n\t\t\treturn false, generalError(\"Failed to retrieve task stage\", err)\n\t\t}\n\n\t\tswitch stage.Status {\n\t\tcase tfe.TaskStagePending:\n\t\t\t// Waiting for it to start\n\t\t\treturn true, nil\n\t\tcase tfe.TaskStageRunning:\n\t\t\t// not a terminal status so we continue to poll\n\t\t\treturn true, nil\n\t\tcase tfe.TaskStagePassed:\n\t\t\treturn false, nil\n\t\tcase tfe.TaskStageCanceled, tfe.TaskStageErrored, tfe.TaskStageFailed:\n\t\t\treturn false, fmt.Errorf(\"Task Stage '%s': %s.\", stage.ID, stage.Status)\n\t\tcase tfe.TaskStageAwaitingOverride:\n\t\t\treturn false, fmt.Errorf(\"Task Stage '%s' awaiting override.\", stage.ID)\n\t\tcase tfe.TaskStageUnreachable:\n\t\t\treturn false, nil\n\t\tdefault:\n\t\t\treturn false, fmt.Errorf(\"Task stage '%s' has invalid status: %s\", stage.ID, stage.Status)\n\t\t}\n\t})\n}\n","sourceCodeStart":29,"sourceCodeEnd":55,"githubUrl":"https://github.com/hashicorp/terraform/blob/c9def3e214014c1188faabfc4a5bde5095139765/internal/backend/remote/backend_taskStages.go#L29-L55","documentation":"Emitted by waitTaskStage (backend_taskStages.go:46-47) when a TaskStage reaches the AwaitingOverride status. This status means a task (typically a Sentinel policy check configured as soft-fail/advisory) finished with results that block the run unless a user with override permission explicitly approves continuing. The error is surfaced so the CLI stops polling and informs the user that a manual decision is required in the UI.","triggerScenarios":"A Sentinel policy set enforced at advisory level soft-fails, or a custom task returns an overridable result, leaving the stage awaiting an admin's override decision in the Terraform Cloud/Enterprise UI.","commonSituations":"Policy deliberately set to 'advisory'/'soft-mandatory' so humans review borderline plans; the run is now paused pending a click-to-override (or dismiss) in the TFC UI.","solutions":["Open the run in the TFC/TFE UI and choose 'Override' (if you have permission) or 'Discard' based on the policy results.","If overrides are expected often, ask the workspace owner to either tighten/loosen the policy enforcement level or grant your team override permission.","If the soft-fail indicates a real compliance issue, fix the config rather than overriding.","Re-run the Terraform command after the override decision is made."],"exampleFix":"// before\nError: Task Stage 'taskstage-xxx' awaiting override.\n\n// after: approve override in UI, then continue\n// (UI: Run > Task Stage > Override) -> terraform resumes / re-run","handlingStrategy":"validation","validationCode":"// Detect AwaitingOverride early and emit guidance instead of polling indefinitely.\nstage, err := b.client.TaskStages.Read(ctx, stageID, &options)\nif err == nil && stage.Status == tfe.TaskStageAwaitingOverride {\n    return fmt.Errorf(\"Task Stage '%s' awaiting override in the TFC UI\", stage.ID)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Configure policy enforcement levels deliberately (hard-mandatory vs advisory).","Grant override permission to the team responsible for the workspace.","Treat AwaitingOverride as a human checkpoint, not an error to silence.","Document the override workflow for operators."],"tags":["task-stage","run-task","override","policy","sentinel","manual-action"],"analyzedSha":"c9def3e214014c1188faabfc4a5bde5095139765","analyzedAt":"2026-08-07T15:39:49.278Z","schemaVersion":2},"datasetVersion":"2026-08-07T21:17:07.882Z"}