# When your AI agent fails twice, make it find the belief that's wrong

dig-apc is a 20-line Claude Code skill. When work fails, the agent writes down every belief it acted on, checks each one against real examples, and starts again from the ones that hold. Why we need it, two times it changed our work, and a one-line install.

On 2026-10-16 I gave a Claude a goal and a hook that checked its work before it could stop. The hook said no, more than a dozen times in 40 minutes. Each time, the Claude tried harder at the same plan: another context line, another guard, another test. Each try was more effort on the same wrong idea of what I wanted.

More effort on a false belief fails again. The fix is to find the belief. So we wrote the steps down, and I gave them a short name.

> name it dig-apc pls. There may be other things to dig on.
>
> Mackenzie, 2026-10-16 10:58

*Figure: A tower of five blocks holds up a plan slab, leaning because one block near the bottom is a crooked wedge. Three small wedge patches drop onto the slab one by one and the lean stays. A green disc steps down the blocks, checking each, and stops at the crooked wedge, which turns tomato. The wedge slides out, a straight green block slides in, the patches tumble off and the plan settles level, labelled start again from the beliefs that hold.* More effort on a false belief fails again. The fix is to find the belief that is wrong and start from the ones that hold.

## What it does

APC stands for axioms, principles and cruxes. When work fails, the agent:

1. Writes what it did, and the result.
2. Writes every belief it acted on, in three groups: what it took as given (axioms), the rules it followed (principles), and the beliefs that would change what it does if they were wrong (cruxes). It includes the ones that seem too obvious to write.
3. For each belief, asks what could show it is false, and goes to look: real data or the source material for facts about the world, the user's own words for what the user wants. Memory doesn't count.
4. Writes down each belief that failed.
5. Starts again from the beliefs that hold. It does not patch the old work.

Then it shows you only the wrong beliefs and what it did about them, not the whole list.

*Figure: Five circles on a line, labelled what it did, every belief, check each, the wrong ones and start again. A marker moves along and lights each. The fourth lights red, the fifth green.* The five steps: what it did, every belief, check each, the wrong ones, start again.

## Twice it changed what we did

On 2026-10-17 my writing agent spent $7.71 of API budget ranking its own drafts with a model judge. I stopped it and asked what the science was for. Its dig found five failed beliefs. The two that mattered: it had judged every draft as a Hacker News developer would read it, but our early customers are nontechnical professionals. And it had treated one post's bookmark count as a measure of the writing, but one account posted the same text six times and got between 14 and 176 bookmarks. The timing decided, not the words. We cancelled a $25 bulk data pull the same hour, and research here now moves in small steps (about 30 posts per query) with a prediction written before each one.

The same day, a research agent dug on its X searches. Its first wrong belief, in its words: "A phrase doesn't select a situation." It had been judging who a poster was from the phrase they used, and it was wrong in both directions: it missed bait in one search and saw sellers who weren't there in another.

*Figure: One bar grows to a red stop, labelled $7.71 of API budget on a model judge, stopped, then dug. A second bar labelled $25 bulk data pull is struck through in red and labelled cancelled the same hour.* Two things the dig changed: a $7.71 spend stopped and a $25 pull cancelled.

## Why the agent can't do this on its own

When you say "that's wrong", an agent searches near its last answer. The belief that produced the answer is the one thing it doesn't question, because it never wrote it down. Writing the beliefs out makes them things it can check. The order matters too: beliefs first, then evidence, then new work. If the agent repairs first, it keeps the old frame.

*Figure: A white disc, the last answer, with small dots circling close to it. A grey disc far to the right is the belief behind it. A green line then reaches across to it and it turns red.* An agent's fixes stay near its last answer; written down, the belief behind it becomes something to check.

## Install it

*Figure: A page labelled SKILL.md on the site lifts, arcs over, and drops into a folder labelled ~/.claude/skills/dig-apc. It turns green, and below it reads: new session: /dig-apc after a failure.* The skill is one file, copied into the skills folder.

The skill is one file. For Claude Code:

```bash
mkdir -p ~/.claude/skills/dig-apc
curl -fsSL https://www.mackenziebowes.com/skills/dig-apc/SKILL.md -o ~/.claude/skills/dig-apc/SKILL.md
```

Start a new session. Type `/dig-apc` after a failure, or say "examine your priors". The agent also calls it by itself when you reject work without saying why. Read the file first: [/skills/dig-apc/SKILL.md](/skills/dig-apc/SKILL.md). Any agent that reads `SKILL.md` folders can use it.

The other two skills we lean on: [do-research](/posts/make-your-agent-read-what-was-published-since-its-training) and [mbsi-mechanism](/posts/find-the-mechanism-before-you-fix-it).

If you run it on your own agents' failures, I'd like to see which beliefs it turns up. mackenzie@mackenziebowes.com or [@_mackenziebowes](https://x.com/_mackenziebowes).

---

Published 2026-10-18. Web page: https://www.mackenziebowes.com/posts/dig-apc-find-the-belief-that-is-wrong
