## TL;DR
The PipelineRun or TaskRun references a Task that does not exist where it looked: wrong name, wrong namespace, or a misconfigured resolver. Verify the Task exists with the exact name and fix the reference. The run starts once the reference resolves.

## Error
```text
tekton: taskrun failed: could not resolve taskref
```

## Steps
1. Read the reference: check the `taskRef` name (and `kind`, if set) in the PipelineRun or TaskRun. Expected: the exact name being looked up.
2. For namespaced Tasks: confirm the Task exists in the same namespace as the run. Expected: the Task is present with the exact name.
3. For ClusterTasks: confirm the `kind` is set correctly and the ClusterTask exists cluster-wide. Expected: no kind/name mismatch.
4. For remote resolvers (bundle, git, hub): check the resolver parameters (bundle image, URL, revision) are reachable and correct. Expected: the resolver can fetch the Task.
5. Fix the reference and re-run. Expected: the TaskRun resolves and executes.

## When to use
- TaskRuns fail immediately with "could not resolve taskref"
- New pipelines or renamed Tasks
- Remote task resolution setups

## When not to use
- Tasks that start but fail in a step (step debugging)
- Permission errors (different message)

## Tool compatibility
- Tekton Pipelines (`taskRef`, Task, ClusterTask, resolvers)

## Variant phrasings
### tekton pipelinerun cannot find task
Check the namespace: namespaced Tasks must live with the run.

### taskref resolver failed tekton
Verify the bundle or git coordinates; resolvers fail on bad URLs or revisions.

## Why it happens
Tekton resolves task references at run creation against a specific scope (namespace, cluster, or remote resolver). A renamed Task, a missing kind, or a bad resolver coordinate all fail the lookup before any step runs, which is why the error appears instantly.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_3BTIgKHyF0IismUiNzKg7A
