TroubleshootingOperator

Troubleshoot Operator from the CLI and agents

Diagnose sign-in, access, refusals, unknown outcomes, waiting jobs, and plan problems when you drive Operator from the operator CLI or an MCP agent.

Start with the exit code, then read the first line of the error. The server's message comes first and the CLI adds what it means. An MCP tool returns the same text as its error.

The command exits 2

Nothing was sent. The arguments or the configuration are wrong.

  • "Not signed in" outside a terminal: run infraone operator login in a terminal, or set HARNESS_API_TOKEN for a headless run.
  • "not an Operator job id", "not a plan id", or "not an Operator procedure id": pass the UUID from infraone operator jobs, infraone operator plan create, or infraone operator job.
  • An instruction that is empty or over 10,000 characters: write it again within the limit. The same limit applies to --instruction-file, which only helps with quoting and instructions that start with -.
  • "unknown job status": --status takes job states or the aliases open, waiting, and done.

The command exits 3

The API was unreachable. Retry with backoff. For steer, cancel, pause, continue, procedure save, and procedure run, exit 3 means the request never reached the server, so nothing changed and running it again is safe.

"Outcome unknown"

An Operator write failed after it may have reached the server: a timeout, a dropped connection, an unreadable answer, or a 5xx. It exits 1 and is never retried, because running it twice can steer twice, open two windows, save two procedures, or start two jobs.

  1. Read what the error names: infraone operator job <job-id> for a job control or continue, the job's procedures for a save, or infraone operator jobs for a run's new job.
  2. Only if the change did not happen, run the command again.

In an agent, call job_show before calling the same tool again.

Access is refused

AnswerWhat to do
403 forbiddenThe credential lacks the scope. A full login has every scope; an API token needs operator:read for reads and operator:write for changes, or harness:read and harness:write for plans and gates. With the message "This token may not access the Harness API", an Operator-only login was used on a plan, gate, or issue-tracker command: those need a full login, which needs staff standing in the organization's tracker.
403 actor_requiredThe credential acts as no person. Use a browser login, or an API token a person created.
403 operator_not_permittedYou have no admin or member role in the organization the credential is bound to. Guests cannot use Operator.
403 operator_disabledOperator is switched off for the organization. Nothing can be read or changed until it is switched back on.
403 run_bound_credentialThe credential belongs to a single automated run and cannot use Operator. Use a browser login.
404 on a job or procedureIt does not exist, is in another organization, or is not shared with you. All three answer alike. A 404 on every command can also mean the server has no Operator API yet.

Signing in fails

  • The sign-in page says "No organization to authorize". You are neither tracker staff nor an Operator member in any organization: you are a guest, or Operator is switched off where you are a member. Ask an organization administrator for access.
  • The sign-in stops with "the received token failed verification (This token may not access the Harness API, HTTP 403)". You chose an organization tagged Operator only, the login that members without staff standing get. CLI 1.15.0 cannot store one: it checks every new login against the tracker, which the Operator-only login cannot reach. Nothing was stored. A CLI release that accepts it is coming.
  • A hint says to run infraone harness login, but you use infraone operator. Run infraone operator login. Both commands are the same program.

A job control is refused

AnswerMeaningWhat to do
403 principal_requiredCancel, pause, and continue belong to the person the job runs as.Ask them, or steer the job if you own it or collaborate on it.
409 invalid_stateThe app wouldn't offer the control now.Read the job with infraone operator job; only a running job can be paused, and a finished, failed, or awaiting-approval job cannot be steered.
409 reconciliation_requiredPartial effects need reconciling.Reconcile them in the app from the job's workbench link.
409 deliveries_unsettledA delivery is still sending, or its outcome is unknown.If the job waits on delivery, settle it in the app; otherwise try again once it has sent.
409 principal_inactiveThe person the job runs as lost the rights to run it.Restore their admin or member role first.
409 cancellation_scope_changedThe job's work changed while it was being cancelled.It was not cancelled. Read it and decide again.

The job waits and nothing happens

infraone operator watch exits 4 when a person has to act, and prints the link to act on. Read waiting_on:

  • approval: open the approval link and approve the change set in the app. No command approves anything, and an agent cannot either.
  • person: the job needs input or ran out of time. The person it runs as continues it with infraone operator continue or Continue in the app.
  • reconciliation: some effects may or may not have happened. Reconcile them in the app.
  • verification: the job's work could not be verified yet. Read the job in the app; continuing retries the verification.
  • delivery: a delivery's outcome is unknown. Settle it in the app; it never settles by itself.

A job that is paused while waiting_on is empty, for example while its deliveries are still sending, resumes by itself. watch keeps following it.

Saving or rerunning a procedure fails

  • 403 owner_required: only the job's owner can save it.
  • 422 not_saveable: the job is not completed with its work verified, or it has no work to repeat.
  • 409 version_conflict: the version you named is no longer current. Run infraone operator procedure show and run that version, or leave out --version.
  • 422 invalid_rerun: the parameters don't fit the procedure's parameter schema, or your current rights don't cover the run. No job was started.
  • 503 service_unavailable: nothing was started. Try again later.

A plan or gate command fails

  • The create lists violations by step key. Nothing was created. Fix each one; see Create and release a plan for the common ones.
  • 409 already_released: the plan is released already. Only a held plan, or one that needs attention, can be released.
  • 409 plan_released on a budget change: hold the plan first, then edit the budget or pass it with infraone operator plan release.
  • 409 active_executions: a step whose Operator job may still run cannot change executor. Wait for the job, or cancel it.
  • 403 grant_refused or plan_room_refused: releasing Operator steps needs the right to run Operator in the organization.
  • "several gates … match": pass the gate's condition identifier instead of its key or label.
  • 403 not_gate_owner, "only its owner, … can tick it": the gate has an owner, and only that owner can tick it. Ask the person the error names.
  • 403 with "This token may not access the Harness API": the login is Operator-only. Plans and gates need a full login.
  • A 404 on every plan command: the server may predate plans.

The agent misbehaves

  • Tools appear twice: both the harness and the operator MCP servers are registered. Remove one.
  • The agent retries a write in a loop: tell it that job controls, continue, save, and run are never retried; after an unknown outcome it must read the job first.
  • The agent says it approved something: it cannot. Check the job with infraone operator job <job-id>; a pending change set still shows its approval link, and the change set is approved in the app.
  • The agent looks for a tool that starts a job: there is none yet; it is coming in a later release. Start the job in the app, or have the agent rerun a saved procedure with procedure_run.