Skip to content
Latchkey

CircleCI "Cannot find a job named ... in workflow"

A workflow names a job CircleCI cannot resolve. The workflow entry does not match any key in the top-level jobs: map (or an orb job), so the pipeline is rejected.

What this error means

Validation fails with "Cannot find a job named X in workflow Y". The pipeline never starts because the workflow graph references a job that does not exist under that name.

circleci
Cannot find a job named "build-and-test" to run in the jobs: section of your configuration.
Please ensure this job is defined.

Common causes

Workflow references an undefined job

A name under workflows.<name>.jobs has no matching entry in jobs: - usually a typo or a renamed job not updated everywhere.

Using the base name instead of an alias

When a job is invoked with a name: alias or via a matrix, the workflow and any requires: must reference that alias, not the underlying job name.

How to fix it

Align workflow names with the jobs map

.circleci/config.yml
version: 2.1
jobs:
  build-and-test:
    docker: [{ image: cimg/node:20.11 }]
    steps: [checkout, { run: npm test }]

workflows:
  ci:
    jobs:
      - build-and-test

Reference the alias when a job is renamed

  1. If a job has a name: in the workflow, use that name everywhere it is referenced.
  2. For matrix jobs, reference the generated alias, not the base job name.
  3. Run circleci config validate to confirm the graph resolves.

How to prevent it

  • Keep workflow job names identical to jobs: keys, or use explicit aliases consistently.
  • Validate config on every PR so a broken graph fails before merge.
  • Update all references when renaming a job.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →