Skip to content

When something goes wrong

Every result says where a run stands: its outcome, whether it has ended, and the next call. When something fails, Turf™ retries nothing. Fix the cause and run up again: it plans over what was left, against the current state, and never replays the failed plan.

✦Your agentin Claude Code
You
Deploy kind-crd.
Agent
  • init
  • open
  • up→awaiting_plan
  • plan→awaiting_approval
  • apply→failed

The first plan was the cluster, a single create, so I approved it. It failed: kind_cluster.demo could not be created, and the provider says it cannot reach Docker. Nothing else ran, since the CRD and the custom resource wait for the cluster. Start Docker, and I’ll run up again.

TOOL RESULTapply→failed
outcome: failed ended: true
rounds: [ { round: 1, status: "failed", planned: 3, deferred: 2, applied: 0, failed: 1,
failures: [ { address: "kind_cluster.demo", error: "…" } ] } ]
You
Docker’s running. Try again.
Agent
  • up→awaiting_plan
  • plan→awaiting_approval

up planned over what was left: the cluster again, a create. It was never made, so there is nothing to clean up first. Approving, and on to the CRD and the custom resource.

illustrative · the shape of a session, not a transcript

The agent reports a failure in the provider’s words, says what succeeded, and names the call that continues, if any. Ask it “what happened?” or “pick up the run on this workspace”. It asks you before it cancels a run another client is following, starts the engine, or force-unlocks state.

A round’s apply makes each change once. When one fails, the round finishes everything independent of it, and the run ends failed. rounds[].failures names each failed change in the provider’s words, and rounds[].actions any action that failed or halted.

  • What did not depend on the failure was applied, and state records every change applied so far.
  • What depends on the failure was not started (rounds[].skipped).
  • A create that failed partway left an object standing. It is tainted, and the next up plans its replacement.
  • A validation decided only at apply fails after the round applied: the round reads applied, and the run ends failed naming the rule.

Fix the cause (a provider-side error, a wrong value, a missing permission, a quota) and run up again. The workspace stays open throughout.

A create-before-destroy replace creates the new object first. If the create fails and wrote nothing, the old object is put back as current in the same round. If it left a partial object, that object is current and tainted, and the next up plans destroying the old one and replacing the tainted one. If deleting the old object fails, it stays in state and the next up plans its destroy. Either way nothing is driven by hand: read the failures, fix the cause, up, and review the plan.

The run ends failed (or error) before anything is applied. rounds[].diagnostics and rounds[].error say why, naming a file and line where there is one. Nothing from a plan that errored is applied. Fix the cause (the configuration, a missing var, a provider’s credentials) and run up again. There is no -target: to go ahead while one resource stays broken, the configuration has to stop declaring it, and the agent asks before editing your files that way.

“No valid credential sources found”, “failed to get shared config profile” and messages like them usually mean the provider wants a variable (AWS_PROFILE, KUBECONFIG, GOOGLE_APPLICATION_CREDENTIALS) that your shell or agent holds and nothing has named for providers. Providers run in the engine. They get its environment and the provider environment, the variables the server sends by name, not your whole session.

Ask the agent for status and look at provider_env. It shows names only, never a value.

  • The variable is not in names, or there is no provider_env: add two lines to the env of Turf’s entry in your agent, restart the agent, and run up again.

    "env": {
    "AWS_PROFILE": "prod",
    "TURF_PROVIDER_ENV": "AWS_PROFILE"
    }
  • The variable is under unset: it is named, but the server’s environment does not hold it. Set it in the entry’s env too.

  • The variable is in names, and in the failed run’s provider_env_names: the provider got it. Look at what the value names where the engine runs (a profile, a file’s path), and at the configuration’s mise environment and the provider’s arguments in HCL, which win over it.

A command that is not found (“executable file not found in $PATH”) is never fixed this way: PATH is not sent. That is the engine’s own environment, or mise: The engine’s environment.

More in Send a variable to providers.

  • stale: the configuration changed, or no longer loads, between the plan and the apply. Nothing was applied. rounds[].stale_reason says what moved. Run up again and review the new plan.
  • stalled: a round applied nothing and still defers, so another round would plan the same thing. The value the deferral waits on will never become known from here: usually a reference to something nothing creates, a provider that can never be configured (missing credentials), or a cycle through a provider block. Read the last plan’s deferred_changes and the round’s diagnostics, change the configuration or the values, and run up again.
  • exhausted: max_rounds (default 5) was reached with work still deferred. Run up again to go on from what was applied, or pass a larger max_rounds.

A cancel lets what is in flight finish and starts nothing new. A round cancelled during its apply ends with status: "partial" in rounds[]: it reached a verdict with cancellations and no failures, its cancelled count saying how many changes were abandoned. The run’s outcome is cancelled. Everything applied is kept: run up again, and plan plans what remains. A provider call that hangs cannot be interrupted: the cancel waits for it to return.

A minor release restarts the engine, and the restart stops every run still on the old engine. One waiting at an approval point ends cancelled, with the upgrade as the cause; apply on it answers cancelled. One in the middle of an apply finishes what is in flight, and its round ends partial. Everything applied is kept: run up again, and plan plans what remains.

After a minor upgrade, two messages say what to restart:

  • “a Turf engine X is running for this user, and this server is Y” with an older engine: restart the engine, as the message says. For one a server started, turf-mcp-server engine stop (npx -y @turfbuild/turf-mcp-server engine stop with the npx install), and the next call starts the new one. For the Homebrew service, brew services restart turf.
  • The same message with a newer engine: the MCP server is the old one. Start the client again; in Claude Code, reconnect turf with /mcp.

The Turf CLI and turf-mcp-server must be the same release.

A run lives in the engine, not in the server or the conversation. open and status report one holding the workspace (its stage, round, whether it is followed, and next), and plan or apply with its convergence_id takes it up: at awaiting_plan, plan; otherwise apply.

  • A digest approves only the plan it names. If the run now waits on another plan, nothing is applied: the refusal names the plan, or the plan the engine holds comes back with a note. The agent reads that plan and approves its digest only as the approval rules allow, and never resends the old one.
  • No digest, no decline, no results answers nothing: the run waiting at a plan gate or an approval point is handed back, and one planning or applying is followed. This is how to take up a run you hold no plan for. Review that plan as new; a destroy always needs your yes.
  • The same arguments again re-follow a call that ended early (cancelled, or the client dropped).
  • A takeover from a server that went away may wait out its lease: up to a minute, refused past two.
  • “… is being followed by another call”: usually one of the agent’s own calls still running, so it waits. With none in flight, another client is following the run: the agent tells you, and asks before it cancels.
  • up again supersedes a run waiting at its plan gate or approval point, and is refused while one is planning or applying. cancel ends the workspace’s run at any stage.

The server starts the engine when a tool first needs it, so these messages say why it has not:

  • “the local Turf engine is still starting”: the server started it for this call, and it did not answer within 90 seconds. It goes on starting: call again in a moment.
  • “the local Turf engine is not running, and …”, or “the local Turf engine did not start”: the message names the reason. TURF_ENGINE_AUTOSTART=off leaves the start to you: brew services start turf, or turf-mcp-server engine run in a terminal; the agent asks before running either itself. A server in a container needs an engine named by TURF_RESTATE_URL. A missing restate-server or turf-engine is named with where the server looked. A start that failed shows the end of ~/.turf/engine/supervisor.log.
  • “the local Turf engine is waiting for Turf’s license terms to be accepted”: accept them (Accept the license); it starts within seconds.

Once it is fixed, call again: nothing needs reconnecting. init, the provider tools and the skills work without the engine.

The first start with npx. Whichever npx command runs Turf first downloads it, which takes about a minute. Let that happen in a terminal, with the first install line (npx -y @turfbuild/turf-mcp-server license accept), not in your agent. If your agent’s first start fails, turn Turf off in your agent, run that line in a terminal and let it finish, then reconnect.

“… is installed without its binary”. An earlier install was interrupted, and npx keeps reusing it, so the server does not start. The message names the npx folder to remove and the steps: stop the engine, turn Turf off in your agent, remove that folder, run npx -y @turfbuild/turf-mcp-server engine status in a terminal and let the download finish, then turn Turf back on. From 1.5.1 the npx install says so itself.

See or stop the engine.

Terminal window
npx -y @turfbuild/turf-mcp-server engine status
npx -y @turfbuild/turf-mcp-server engine stop

With Homebrew or the script, the same commands are turf-mcp-server engine status and turf-mcp-server engine stop. After engine stop, the next call that needs the engine starts it again.

“the state is already locked by another tofu client”: first check for a run holding the workspace (open reports it), and pick it up or cancel it; never force-unlock it. Otherwise, the agent asks you before force_unlock. The full procedure is on Workspaces and backends.

What watch and status say when drift detection is not doing what you expect. The words are in Drift, the task in Watching for drift.

watch returns unwatched. Nothing watches the workspace, and the note says why: drift detection was never turned on for it, it was turned off (the note says when), the workspace has no state yet, or the engine has no drift detection. The watch would never wake, so the agent stops calling it. Turn detection on with drift, enabled: true and a sweep, which is your choice. Until then an up’s plan reads every object and is the drift report.

drift returns stored. The settings were kept, and detection is off, so nothing watches the workspace yet. They take effect when drift with enabled: true turns it on.

An up that asked for detection did not turn it on. Its last result’s drift.state says why. kept_off: detection was turned off after the run began, and that later choice stands. not_applied: the run did not converge. failed: the change itself failed, error says why, and what the run applied is applied. Once the workspace has state, drift with enabled: true and a sweep turns detection on, if you still want it.

Every notice is unconfirmed. Nothing reads an object that is marked as changed. If the coverage line in status ends confirm off, the confirming read is turned off: turn it back on with drift and confirm: true. Otherwise no standing seal stands. The engine takes the seal from an up that converges, so run up once on this engine. One unconfirmed notice among confirmed ones is a read that failed three times.

Objects are uncovered. Nothing reads them between runs. When the whole workspace is affected, the coverage line gives the reason in parentheses: the sweep is off, the confirming read is off, or no standing seal stands. Otherwise the cause is the object’s own: its provider is configured from an ephemeral value or from a data source state holds no value for, the configuration directory is not on the engine’s host, or the object is tainted. The console’s Drift tab names the providers that cannot be configured; tainted objects are counted, not listed. A scoped plan does not read uncovered objects; plan with no refresh_drift and no refresh_addresses reads them all.

A field is contended. The same paths drifted again after two runs put them back, so another controller writes them: an autoscaler, an operator, an admission webhook. Another up will not hold, and the notice carries no next. Either list the paths under ignore_changes or stop the other controller. The files are yours, so the agent asks first.

A watch never wakes. waiting is not a failure: it is the server’s deadline, and the agent calls again. If nothing comes when you expect it, check in this order:

  • Is anything signalling? A coverage line with sweep off means no: the sweep is what signals a change. Turn it on with drift and a sweep.
  • Is the sweep running? It needs a standing seal and the confirming read, and it pauses while a run holds the workspace.
  • Is the object covered? See uncovered, above.
  • Is the change noise? A computed value nothing reads, a path under ignore_changes, or a field the resource does not manage never becomes a notice.
  • Was it already reported? A watch wakes on what its cursor has not seen. status shows everything open.
  • Is quiet_for holding it? It waits until the open notices have been still that long.
  • Did the client give up first? A --watch-deadline longer than the client’s limit on a tool call ends the call on the client’s side. In Claude Code, raise MCP_TOOL_TIMEOUT.

The sweep is behind its cycle. The coverage line in status ends by saying so, and drift says it when you change a setting. It means a cycle will not reach every object within its target. The line names one of two limits:

  • The read budget. One cycle needs more reads a second than the budget’s rate allows. A longer cycle fixes it, or a higher rate, TURF_DRIFT_READ_RATE.
  • The engine’s own cadence. The rate would allow it, but a swept batch takes only what is above the budget’s reserve, half the burst, one batch at a time: about two reads a second at the defaults. A longer cycle fixes it, or a larger burst, TURF_DRIFT_READ_BURST.

A longer cycle is drift with a larger sweep. At the defaults a workspace of n objects needs about n ÷ 2 seconds. The rate and the burst are the engine’s read budget: its operator sets them, and no tool does.

Nothing is lost while the sweep is behind. Every object is still read, later than the cycle says.

watch or status shows drift and no next. Either a run holds the workspace (finish or cancel it first), or every open notice is contended, or the server runs at a tier that lists no up: read or apply. The note says which. The up starts from a server at the plan or full tier.

A plan’s drift is zero, and resource_drift lists rows. Those rows differ from their records only in a null collection against an empty one. OpenTofu® lists them, so the document does. No plan changes them, so the count leaves them out, and the result’s note says so. Between runs the same difference is noise and raises no notice.

A notice does not clear. A notice clears when a run commits its address, or when a later read finds the object as recorded. If a plan shows no change for the address, the difference is one the provider does not plan, and the notice stays open while reads keep finding it. No tool acknowledges a notice by hand.

The up that puts a field back fails with a field manager conflict. After a server-side apply by someone else, that manager owns the field, and a kubernetes_manifest cannot take it back without force_conflicts:

resource "kubernetes_manifest" "web" {
# …
field_manager {
force_conflicts = true
}
}
Outcome Meaning Next
awaiting_plan The round waits at its plan gate: nothing planned yet. plan with convergence_id.
awaiting_approval Paused at an approval point. Review the plan; apply with its digest, or decline; or edit and up again.
awaiting_actions The apply waits on turf actions (action_requests). Perform them; apply with action_results.
planning, applying Returned at the server’s deadline (ended: false); the run goes on in the engine. plan or apply with convergence_id, as next says; cancel stops it.
converged Done: nothing left deferred. output; report.
failed A change or an action failed, or the round ended before applying. Read rounds[].failures, .actions, .error; fix the cause; up again.
stalled A round applied nothing and still defers. Read the deferrals; change the configuration or the values; up again.
exhausted max_rounds reached with work still deferred. up again, or a larger max_rounds.
stale The configuration changed, or no longer loads, after the plan: nothing applied. up again; review the new plan.
declined The plan was declined: nothing applied. up to plan again.
cancelled Ended by cancel, or superseded at a plan gate or approval point. What was in flight finished. up to plan again.
planned A plan_only run kept its plan as a planfile; nothing applied. apply with planfile and plan_digest.
detached The server stopped following it; it waits in the engine. Pick it up, as above.
error The engine raised (error). Read it, fix what it names, up again.

Each rounds[] entry counts planned (no-ops and deferrals included), deferred, applied, drift, refresh_skipped (rows a scoped refresh left unread), failed, skipped, cancelled and invoked, and carries its status.

Error What to do
Inconsistent dependency lock file A provider was added, or a constraint no longer admits the locked version: run init, with upgrade: true only to move a locked version. Never delete or hand-edit the lock file. If a package no longer matches the lock’s checksums, stop and look: that can be a tampered package.
… this engine milestone does not walk … A construct Turf refuses. See Differences from Terraform®. Don’t strip it out without the owner’s say-so.
Resource instance cannot be destroyed prevent_destroy doing its job: the plan wanted to destroy that instance. Never disable the flag or remove its block without the owner’s say-so.
Unsupported attribute, … references …, which this configuration does not declare A typo, or a module output the module does not declare: read the module’s output blocks.
A required variable has no value Pass it as var, or ask the user.
lineage … is bound to backend … and this open arrives from a different backend The backend moved: open again with reconfigure. See Workspaces and backends.

Turf™ is a trademark of Turf LLC. Terraform® is a trademark of HashiCorp. Ansible® is a trademark of Red Hat, LLC, registered in the United States and other countries. Helm®, Kubernetes®, Prometheus® and OpenTelemetry® are registered trademarks, and Jaeger™ is a trademark, of the Linux Foundation. OpenTofu® and Model Context Protocol® are registered trademarks of LF Projects, LLC. All other trademarks are the property of their respective owners. Turf is not affiliated with, endorsed by, or sponsored by HashiCorp, IBM, Red Hat, the Linux Foundation, LF Projects or the OpenTofu project.

© 2026 Turf LLC. Free for individuals, education and small businesses within the Community limits, under the Turf Community Edition License 1.0. Government and larger organizations need a commerciallicense.turf.build · Discord ·GitHub