go-task/task · warning

task: Task "%s" is not up-to-date

Error message

task: Task "%s" is not up-to-date

What it means

When a task is invoked with `--status` (or status checking is requested), IsUpToDate consults the fingerprinter; if the fingerprinter reports the task is stale, it returns this error instead of a boolean. It tells the caller the task's sources changed (or status checks failed) and the task needs re-running. Note it's returned as an error even though 'not up-to-date' is a normal condition.

Source

Thrown at status.go:23

	"fmt"

	"github.com/go-task/task/v3/taskfile/ast"
)

// Status returns an error if any the of given tasks is not up-to-date
func (e *Executor) Status(ctx context.Context, calls ...*Call) error {
	for _, call := range calls {
		t, err := e.CompiledTask(call)
		if err != nil {
			return err
		}

		isUpToDate, err := e.fingerprinter().UpToDate(ctx, t)
		if err != nil {
			return err
		}
		if !isUpToDate {
			return fmt.Errorf(`task: Task "%s" is not up-to-date`, t.Name())
		}
	}
	return nil
}

func (e *Executor) statusOnError(t *ast.Task) error {
	return e.fingerprinter().OnError(t)
}

View on GitHub (pinned to 385e5ad92a)

Solutions

  1. Run the task normally to regenerate outputs, then re-check status
  2. If the stale condition is expected (e.g. first run), run the task once to establish the fingerprint baseline
  3. Verify the `sources:`/`generates:` and `status:` definitions match reality (correct paths, correct check commands)
  4. In scripts, treat this error as a signal to execute the task, not a failure of Task itself

Example fix

# before
task --status build || exit 1
# after
task --status build || task build
Defensive patterns

Strategy: try-catch

Validate before calling

// check staleness yourself before --status
defOut, _ := os.Stat("dist/app.bin")
defSrc, _ := os.Stat("src/**/*.go")
if defOut == nil || defSrc.ModTime().After(defOut.ModTime()) {
  // task will report not up-to-date; run it first
  runTask("build")
}

Try / catch

err := e.Status(ctx, t)
if err != nil && strings.Contains(err.Error(), "is not up-to-date") {
  // treat as a cue to run the task, not as a hard failure
  return t.Run(ctx)
}

Prevention

When it happens

Trigger: Running `task --status <task>` (or code path that requires up-to-date confirmation) where UpToDate returns false because sources/checksum/timestamps changed, or the task's `status:` commands indicate staleness.

Common situations: CI pipelines using --status to decide whether to skip a job, generated artifacts missing or regenerated by another process, clock/timestamp changes making the target appear stale, or first run with checksum method and no prior checksum stored.

Related errors


AI-assisted analysis of go-task/task@385e5ad92a (2026-09-05). Data as JSON: /api/errors/e4b86681dd5bee3b. Report an issue: GitHub.