{"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/d32a084675427f5ac3f7d2868578ef8b2c1dc525/internal/backend/remote/backend_taskStages.go#L29-L55","documentation":"waitTaskStage returns this when stage.Status is TaskStageAwaitingOverride: a mandatory task stage failed and TFC is pausing the run, waiting for a user to either override the failure or cancel. The remote backend surfaces it as a polling-stopping error.","triggerScenarios":"A mandatory run task failed; TFC sets the stage to awaiting-override rather than a hard terminal status, expecting a human decision in the UI/CLI.","commonSituations":"Preventive policy check failed on a mandatory task; cost-estimation or quality gate blocking apply; team needs to decide between overriding (proceed) or canceling the run.","solutions":["Decide in the TFC/TFE UI: 'Override' to proceed or 'Cancel' to abort the run.","If overrides are common, review whether the task should be advisory rather than mandatory.","Address the underlying task failure so the next run passes without an override."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Detect awaiting-override and prompt the user instead of failing silently\nif stage.Status == tfe.TaskStageAwaitingOverride {\n    return fmt.Errorf(\"stage %s awaits override decision in TFC\", stage.ID)\n}","typeGuard":"func needsOverride(s tfe.TaskStageStatus) bool {\n    return s == tfe.TaskStageAwaitingOverride\n}","tryCatchPattern":null,"preventionTips":["Tune enforcement level (advisory vs mandatory) to match override appetite.","Wire alerts on awaiting-override stages so failures aren't left hanging.","Address the underlying task so overrides become rare."],"tags":["terraform","remote-backend","tfe","run-tasks","override","stage"],"backgroundTag":null,"analyzedSha":"d32a084675427f5ac3f7d2868578ef8b2c1dc525","analyzedAt":"2026-08-11T18:43:52.779Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}