# Pulumi debug failed operation

> Pulumi debug failed operation is an open-source agent skill for cloud and infrastructure. Diagnoses a failed Pulumi update or preview by reading its recorded errors and fixing. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/pulumi/agent-skills/tree/main/pulumi/skills/pulumi-debug-failed-operation
- **Repository:** https://github.com/pulumi/agent-skills
- **GitHub stars:** 82
- **License:** Apache-2.0
- **Skill name:** pulumi-debug-failed-operation
- **Collection:** https://github.com/pulumi/agent-skills
- **Categories:** [cloud and infrastructure](https://ai-powered.com/categories/cloud-and-infrastructure), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

This skill guides an agent through finding out why a Pulumi update or preview failed. It starts by confirming which operation the user means, then pulls the engine's recorded diagnostic and policy events from Pulumi Cloud through the pulumi api command, along with the run's environment details such as targets and commit.

The workflow separates the first real error from the cascade of follow-on messages that a failure usually produces, such as shutdown and connection-closed traces. It then traces that error back to the resource, the program code, and the inputs behind it. A bundled reference file lists common failure patterns and their fixes, and the skill sorts each problem into one of six places to fix it: program, command, stack config, workspace, state, or environment.

The skill expects the Pulumi CLI with access to a Pulumi Cloud stack, and jq and sed available in the shell. It asks for confirmation before deleting or replacing resources, deploying, or changing permissions.

## When your agent uses it

> Debug a Pulumi update or preview that failed: read the failure Pulumi already recorded, find what caused it, and fix it. Load this skill when the user asks to debug, diagnose, or fix a failed update or preview, or points at a failing `pulumi up` or `pulumi preview`. Don't load it for authoring new infrastructure, migrations, or provider upgrades; those have their own skills.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/pulumi/agent-skills/tree/HEAD/pulumi/skills/pulumi-debug-failed-operation)
- [License: Apache-2.0](https://github.com/pulumi/agent-skills/tree/HEAD/pulumi/skills/pulumi-debug-failed-operation)

## Features

- **Operation identification:** Works out which failed update or preview the user means, filling in org, project, stack and version from context.
- **Event retrieval:** Fetches diagnostic and policy events for a failed run through the Pulumi Cloud API.
- **Root cause isolation:** Separates the first real error from downstream shutdown and cancellation messages.
- **Fix location triage:** Decides whether the fix belongs in code, the command, config, workspace, state or environment.
- **Common failures reference:** Includes a searchable reference of known failure messages and their resolutions.
- **Safe change guidance:** Requires user confirmation before destructive or production-affecting changes.

## Good for

- Diagnose why my last pulumi up failed on the staging stack
- Explain the error from a failed pulumi preview in CI
- Find which resource caused update 161 to fail
- Check whether a policy violation blocked my deployment
- Fix a missing stack config key that broke a preview

## Install

### Claude Code

This skill ships in the `pulumi` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add pulumi/agent-skills
/plugin install pulumi@pulumi-agent-skills
```

Or copy only this skill to `~/.claude/skills/pulumi-debug-failed-operation`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/pulumi/agent-skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/pulumi-debug-failed-operation &&
cp -R "$tmp/pulumi/skills/pulumi-debug-failed-operation" ~/.claude/skills/pulumi-debug-failed-operation &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/pulumi-debug-failed-operation` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/pulumi-debug-failed-operation` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/pulumi/agent-skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/pulumi-debug-failed-operation &&
cp -R "$tmp/pulumi/skills/pulumi-debug-failed-operation" ~/.agents/skills/pulumi-debug-failed-operation &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/pulumi-debug-failed-operation` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/pulumi-debug-failed-operation` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/pulumi/agent-skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/pulumi-debug-failed-operation &&
cp -R "$tmp/pulumi/skills/pulumi-debug-failed-operation" ~/.cursor/skills/pulumi-debug-failed-operation &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/pulumi-debug-failed-operation` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/pulumi/agent-skills.git --path pulumi/skills/pulumi-debug-failed-operation
```

Or copy the folder to `~/.gemini/skills/pulumi-debug-failed-operation` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/pulumi-debug-failed-operation`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/pulumi/agent-skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/pulumi-debug-failed-operation &&
cp -R "$tmp/pulumi/skills/pulumi-debug-failed-operation" ~/.copilot/skills/pulumi-debug-failed-operation &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/pulumi-debug-failed-operation` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/pulumi/agent-skills.git
```

Then copy `agent-skills/pulumi/skills/pulumi-debug-failed-operation` into your agent's skills folder as `pulumi-debug-failed-operation`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does Pulumi debug failed operation need to run?

It uses the Pulumi CLI's pulumi api subcommand to reach Pulumi Cloud, and the shell commands rely on jq and sed.

### When should Pulumi debug failed operation be loaded?

When the user asks to debug, diagnose or fix a failed update or preview, or points at a failing pulumi up or pulumi preview. It is not for authoring new infrastructure, migrations or provider upgrades.

### Does Pulumi debug failed operation change anything without asking?

No. It asks the user before deleting or replacing resources, deploying another stack or to production, or changing permissions.

### Does Pulumi debug failed operation work on a local run that isn't in Pulumi Cloud?

The event lookup targets Pulumi Cloud stack records; for local runs the skill suggests rerunning the preview with --debug and reading that output.

### How do I install Pulumi debug failed operation in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/pulumi-debug-failed-operation to use it in all your projects, or to .claude/skills/pulumi-debug-failed-operation in one project. Or install the pulumi plugin, which includes it: /plugin marketplace add pulumi/agent-skills, then /plugin install pulumi@pulumi-agent-skills.

### Does Pulumi debug failed operation run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Pulumi debug failed operation?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Pulumi debug failed operation?

The closest alternatives to Pulumi debug failed operation are Pulumi best practices, Pulumi delivery, Pulumi overview, Provider upgrade and Pulumi automation API.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Pulumi best practices](https://ai-powered.com/skills/pulumi-best-practices): Pulumi best practices is an open-source agent skill for cloud and infrastructure.
- [Pulumi delivery](https://ai-powered.com/skills/pulumi-delivery): Pulumi delivery is an open-source agent skill for cloud and infrastructure.
- [Pulumi overview](https://ai-powered.com/skills/pulumi-overview): Pulumi overview is an open-source agent skill for cloud and infrastructure.
- [Provider upgrade](https://ai-powered.com/skills/provider-upgrade): Provider upgrade is an open-source agent skill for cloud and infrastructure.
- [Pulumi automation API](https://ai-powered.com/skills/pulumi-automation-api): Pulumi automation API is an open-source agent skill for cloud and infrastructure.
- [Pulumi create agent](https://ai-powered.com/skills/pulumi-create-agent): Pulumi create agent is an open-source agent skill for cloud and infrastructure.
- [Pulumi upgrade provider](https://ai-powered.com/skills/pulumi-upgrade-provider): Pulumi upgrade provider is an open-source agent skill for developer tools.
- [Pulumi cdk to pulumi](https://ai-powered.com/skills/pulumi-cdk-to-pulumi): Pulumi cdk to pulumi is an open-source agent skill for cloud and infrastructure.

---
Source: https://ai-powered.com/skills/pulumi-debug-failed-operation
