argoproj/argo-workflows · warning
failed waiting for debug-pause-after marker: %w
Error message
failed waiting for debug-pause-after marker: %w
What it means
When ARGO_DEBUG_PAUSE_AFTER=true, argoexec pauses after the container command exits and waits for the marker file /var/run/argo/ctr/<container>/after to be created, letting a developer inspect state. This error is thrown when that wait is interrupted — almost always because the surrounding context was cancelled or its deadline expired before the marker appeared.
Source
Thrown at cmd/argoexec/commands/emissary.go:279
if err != nil {
logger.WithField("containerName", containerName).WithError(err).Error(innerCtx, "failed to terminate/kill container")
}
}()
break
}
}
return osspecific.Wait(command.Process)
})
logger.WithError(cmdErr).Info(ctx, "sub-process exited")
if os.Getenv("ARGO_DEBUG_PAUSE_AFTER") == "true" {
// User can create the file: /ctr/NAME_OF_THE_CONTAINER/after
// in order to break out of the wait and release the container from
// the debugging state.
if waitErr := file.WaitForCreate(ctx, varRunArgo+"/ctr/"+containerName+"/after"); waitErr != nil {
return fmt.Errorf("failed waiting for debug-pause-after marker: %w", waitErr)
}
}
exitCode = exitCodeFromErr(cmdErr, exitCode)
if containerName == common.MainContainerName {
for _, x := range template.Outputs.Parameters {
if x.ValueFrom != nil && x.ValueFrom.Path != "" {
if err := saveParameter(ctx, template, x.ValueFrom.Path); err != nil {
return err
}
}
}
for _, x := range template.Outputs.Artifacts {
if x.Path != "" {
if err := saveArtifact(ctx, template, x.Path); err != nil {
return err
}View on GitHub (pinned to 35bff19146)
Solutions
- Exec into the pod and create the marker: kubectl exec <pod> -c <container> -- touch /argo/ctr/<containerName>/after.
- Extend or remove activeDeadlineSeconds / termination grace while debugging.
- Unset ARGO_DEBUG_PAUSE_AFTER when not actively debugging.
- Do not delete/terminate the workflow while paused.
Example fix
// before (pod deleted while paused) ARGO_DEBUG_PAUSE_AFTER: "true" # no one creates the marker // after # in another terminal, before the deadline: kubectl exec -it <pod> -c main -- touch /argo/ctr/main/after
Defensive patterns
Strategy: try-catch
Validate before calling
// Before relying on the pause, confirm the env and that you can exec in: // kubectl exec <pod> -c <ctr> -- sh -c 'test -w /argo/ctr && echo ok'
Try / catch
try {
await waitPodTermination(pod)
} catch (e) {
if (String(e).includes('debug-pause-after')) {
// create the marker or release the workflow:
// kubectl exec <pod> -c <ctr> -- touch /argo/ctr/<ctr>/after
}
} Prevention
- Only set ARGO_DEBUG_PAUSE_AFTER while actively debugging, and unset afterwards.
- Script the marker creation immediately after the pod starts.
- Raise activeDeadlineSeconds while debugging.
When it happens
Trigger: ARGO_DEBUG_PAUSE_AFTER env set to "true" but nobody creates the /ctr/<name>/after file before the context is cancelled (workflow terminated, pod deleted, debug timeout elapsed).
Common situations: Developer enables the debug pause but forgets to exec into the pod and touch the marker file; the pod's grace period or the workflow's activeDeadlineSeconds kills it first; kubectl exec session fails so the file is never created.
Related errors
- failed to read container args file %s: %w
- failed to unmarshal container args: %w
- failed to read template: %w
- failed to start command: %w
- failed to create emissary: %w
AI-assisted analysis of argoproj/argo-workflows@35bff19146 (2026-09-03).
Data as JSON: /api/errors/da41ac14dba9bbf8.
Report an issue: GitHub.