argoproj/argo-workflows · warning
failed waiting for debug-pause-before marker: %w
Error message
failed waiting for debug-pause-before marker: %w
What it means
When ARGO_DEBUG_PAUSE_BEFORE=true, argoexec deliberately pauses before launching the main command and blocks until a human creates the marker file /var/run/argo/ctr/<containerName>/before (for interactive debugging via kubectl exec). This error means that wait was interrupted — the context was cancelled (pod terminating / timeout) or the file watcher failed — so the container cannot proceed.
Source
Thrown at cmd/argoexec/commands/emissary.go:219
exitCode = code
if exitCode != 0 {
return fmt.Errorf("dependency %q exited with non-zero code: %d", y, exitCode)
}
}
}
}
name, err = exec.LookPath(name)
if err != nil {
return fmt.Errorf("failed to find name in PATH: %w", err)
}
if os.Getenv("ARGO_DEBUG_PAUSE_BEFORE") == "true" {
// User can create the file: /ctr/NAME_OF_THE_CONTAINER/before
// in order to break out of the wait and release the container from
// the debugging state.
if waitErr := file.WaitForCreate(ctx, varRunArgo+"/ctr/"+containerName+"/before"); waitErr != nil {
return fmt.Errorf("failed waiting for debug-pause-before marker: %w", waitErr)
}
}
backoff, err := template.GetRetryStrategy()
if err != nil {
return fmt.Errorf("failed to get retry strategy: %w", err)
}
cmdErr := retry.OnError(backoff, func(error) bool { return true }, func() error {
command, closer, err := startCommand(ctx, name, args, template, containerName, includeScriptOutput)
if err != nil {
return fmt.Errorf("failed to start command: %w", err)
}
defer closer()
forwardSignals(ctx, signals, command.Process.Pid, false)
pid := command.Process.Pid
innerCtx, cancel := context.WithCancel(ctx)View on GitHub (pinned to 35bff19146)
Solutions
- kubectl exec into the pod and create the marker: touch /var/run/argo/ctr/<containerName>/before
- Unset ARGO_DEBUG_PAUSE_BEFORE (remove it from the container env) and rerun the workflow
- If the pod is gone, resubmit the workflow without the debug flag
- Ensure activeDeadlineSeconds is generous while debugging
Example fix
// before env: - name: ARGO_DEBUG_PAUSE_BEFORE value: "true" // after (remove or set false) env: - name: ARGO_DEBUG_PAUSE_BEFORE value: "false"
Defensive patterns
Strategy: try-catch
Validate before calling
// ensure the flag is only set in dev
if (process.env.ARGO_DEBUG_PAUSE_BEFORE === 'true' && process.env.NODE_ENV === 'production') throw new Error('ARGO_DEBUG_PAUSE_BEFORE must not be set in production') Try / catch
try { await run() } catch (e) { if (/failed waiting for debug-pause-before marker/.test(e.message)) { // exec into pod: touch /var/run/argo/ctr/<name>/before, or disable flag and retry
} throw e } Prevention
- Never set ARGO_DEBUG_PAUSE_BEFORE outside interactive debugging sessions
- Remember any env var added to the pod must be documented (docs/environment-variables.md)
- Set a reminder to remove the flag after debugging; search pod specs before submit
- Allow ample activeDeadlineSeconds while paused
When it happens
Trigger: ARGO_DEBUG_PAUSE_BEFORE env var set to "true" and the marker file was never created before the pod's context ended: pod deleted/deadline exceeded, or file.WaitForCreate failed (inotify watch error on /var/run/argo/ctr/<name>).
Common situations: A developer enabled the debug pause (typically via the ARGO_DEBUG_PAUSE_BEFORE env var) but forgot to exec into the pod and touch the file; CI runs with the flag accidentally set; activeDeadlineSeconds kills the pod while paused.
Related errors
AI-assisted analysis of argoproj/argo-workflows@35bff19146 (2026-09-03).
Data as JSON: /api/errors/6da7da78b19fd672.
Report an issue: GitHub.