Context Bankruptcy Skill
Every long-lived agent slowly fills with sediment: the org chart from two
reorgs ago, the project that got cancelled but still shapes its suggestions,
the preference you expressed once, sarcastically, in March. Deleting everything
loses the genuinely valuable judgment it accumulated; deleting nothing means
arguing with a colleague who lives in the past. Bankruptcy is the middle path
with discipline: audit the beliefs, keep what's true, correct what drifted,
purge what's wrong or expired — and write down what was lost, because silent
memory loss is how the same wrong belief gets re-learned from the same stale
sources next month.
What This Skill Produces
- A belief audit: what the agent currently holds, organized into facts /
preferences / procedures / relationships, each dated and sourced where
possible
- A keep / correct / purge ledger with a reason per entry — the artifact
that makes the bankruptcy deliberate instead of a rage-wipe
- A restated ground-truth file: the clean, current worldview to reload,
written to survive the next drift longer (dated claims, expiry hints)
- A bankruptcy record: what was purged and why, plus the re-learn guards —
which stale sources fed the bad beliefs and how to stop them refeeding
Required Inputs
Ask for (if not already provided):
- The agent's memory contents, exported or pasted (memory files, saved
context, custom instructions, whatever the platform exposes) — the audit
works on what it can see, and says so
- The symptoms: what it keeps getting wrong, where it contradicts itself
- What changed in reality (reorg, pivot, new stack, new owner) and when
- What the agent is good at that must survive — the reason this is
bankruptcy, not deletion
Process
- Extract beliefs, not text. Convert the memory dump into discrete claims:
"believes the platform team owns billing" · "believes user prefers terse
answers" · "believes deploys happen Fridays". Tag each: fact / preference /
procedure / relationship, with best-guess age. Unstated-but-acted-on
beliefs (visible in the symptoms) go in too, marked inferred.
- Sort against current reality. With the user, mark each claim KEEP
(true, valuable) · CORRECT (right shape, wrong details — write the fix) ·
PURGE (wrong, expired, or toxic — including preferences the user no longer
holds). Rule for ties: a belief that can silently misdirect output is
PURGE-by-default; a belief that's merely unused can stay.
- Find the feeders. For each purged belief worth the trouble: where did it
come from, and does that source still exist (an old doc it can read, a
stale instruction file, a pinned message)? Purging the belief but not the
feeder schedules the relapse.
- Restate ground truth to age well. Write the reload file with dated
claims ("as of Jul 2026, billing is owned by…"), explicit preferences in
the user's own words, and expiry hints ("re-verify org facts quarterly").
Load order matters on most platforms: ground truth in the durable slot
(instructions/memory), not a chat message that scrolls away.
- Record the bankruptcy. What was purged, why, date, and the guards
added. Schedule the next audit — sediment accumulates at a knowable rate;
quarterly is the sane default for daily-driver agents.
Output Format
## Belief audit — [agent], [date]
| # | Belief (as a claim) | Type | Age | Source | Inferred? |
## The ledger
| # | Verdict (KEEP / CORRECT→fix / PURGE) | Reason |
## Ground truth v[N] (reload this)
[Dated claims · preferences verbatim · procedures · expiry hints]
## Bankruptcy record
[Purged: what & why · Feeders closed: … · Guards added: … · Next audit: date]
Quality Checks
Anti-Patterns
Related
[[session-handoff]] compresses a session; this resets a worldview.
[[context-budget]] for the token-layout side; [[agent-severance]] when the
answer is offboarding, not bankruptcy.
1---2name: context-bankruptcy3description: Declare bankruptcy on a long-lived AI agent's accumulated memory — audit what it currently believes, separate ground truth from stale and wrong, purge deliberately, restate the truths that survive, and log what was lost. Use when an agent keeps acting on outdated facts, contradicts itself across sessions, 'remembers' things wrong, or after a reorg/pivot makes its worldview obsolete. Produces a belief audit, a keep/correct/purge ledger, a restated ground-truth file, and the bankruptcy record.4---5
6# Context Bankruptcy Skill
7
8Every long-lived agent slowly fills with sediment: the org chart from two
9reorgs ago, the project that got cancelled but still shapes its suggestions,
10the preference you expressed once, sarcastically, in March. Deleting everything
11loses the genuinely valuable judgment it accumulated; deleting nothing means
12arguing with a colleague who lives in the past. Bankruptcy is the middle path
13with discipline: audit the beliefs, keep what's true, correct what drifted,
14purge what's wrong or expired — and write down what was lost, because silent
15memory loss is how the same wrong belief gets re-learned from the same stale
16sources next month.
17
18## What This Skill Produces
19
20- A **belief audit**: what the agent currently holds, organized into facts /
21 preferences / procedures / relationships, each dated and sourced where
22 possible
23- A **keep / correct / purge ledger** with a reason per entry — the artifact
24 that makes the bankruptcy deliberate instead of a rage-wipe
25- A **restated ground-truth file**: the clean, current worldview to reload,
26 written to survive the next drift longer (dated claims, expiry hints)
27- A **bankruptcy record**: what was purged and why, plus the re-learn guards —
28 which stale sources fed the bad beliefs and how to stop them refeeding
29
30## Required Inputs
31
32Ask for (if not already provided):
33- The agent's memory contents, exported or pasted (memory files, saved
34 context, custom instructions, whatever the platform exposes) — the audit
35 works on what it can see, and says so
36- The symptoms: what it keeps getting wrong, where it contradicts itself
37- What changed in reality (reorg, pivot, new stack, new owner) and when
38- What the agent is *good* at that must survive — the reason this is
39 bankruptcy, not deletion
40
41## Process
42
431. **Extract beliefs, not text.** Convert the memory dump into discrete claims:
44 "believes the platform team owns billing" · "believes user prefers terse
45 answers" · "believes deploys happen Fridays". Tag each: fact / preference /
46 procedure / relationship, with best-guess age. Unstated-but-acted-on
47 beliefs (visible in the symptoms) go in too, marked *inferred*.
482. **Sort against current reality.** With the user, mark each claim KEEP
49 (true, valuable) · CORRECT (right shape, wrong details — write the fix) ·
50 PURGE (wrong, expired, or toxic — including preferences the user no longer
51 holds). Rule for ties: a belief that can silently misdirect output is
52 PURGE-by-default; a belief that's merely unused can stay.
533. **Find the feeders.** For each purged belief worth the trouble: where did it
54 come from, and does that source still exist (an old doc it can read, a
55 stale instruction file, a pinned message)? Purging the belief but not the
56 feeder schedules the relapse.
574. **Restate ground truth to age well.** Write the reload file with dated
58 claims ("as of Jul 2026, billing is owned by…"), explicit preferences in
59 the user's own words, and expiry hints ("re-verify org facts quarterly").
60 Load order matters on most platforms: ground truth in the durable slot
61 (instructions/memory), not a chat message that scrolls away.
625. **Record the bankruptcy.** What was purged, why, date, and the guards
63 added. Schedule the next audit — sediment accumulates at a knowable rate;
64 quarterly is the sane default for daily-driver agents.
65
66## Output Format
67
68```
69## Belief audit — [agent], [date]
70| # | Belief (as a claim) | Type | Age | Source | Inferred? |
71
72## The ledger
73| # | Verdict (KEEP / CORRECT→fix / PURGE) | Reason |
74
75## Ground truth v[N] (reload this)
76[Dated claims · preferences verbatim · procedures · expiry hints]
77
78## Bankruptcy record
79[Purged: what & why · Feeders closed: … · Guards added: … · Next audit: date]
80```
81
82## Quality Checks
83
84- [ ] Beliefs are discrete, checkable claims — not pasted memory prose
85- [ ] Every PURGE has a reason; every CORRECT has the actual correction written
86- [ ] At least one feeder was traced — bankruptcy without closing feeders is a
87 subscription to this skill
88- [ ] Ground-truth claims are dated and the file says where it should live on
89 the platform (durable slot, not chat)
90- [ ] What-was-lost is recorded — the user can consciously re-teach, rather
91 than discover absence mid-task
92
93## Anti-Patterns
94
95- [ ] Do not rage-wipe — full deletion without the audit loses the judgment
96 that took months to accumulate, which is why this skill exists
97- [ ] Do not keep contradictions to "be safe"; two contradictory beliefs means
98 the agent picks one at random per session
99- [ ] Do not restate ground truth undated — undated truth is next quarter's
100 sediment
101- [ ] Do not treat vendor "memory deleted" claims as verified for sensitive
102 content — note what the platform actually promises (see
103 [[agent-severance]] for full offboarding)
104
105## Related
106
107[[session-handoff]] compresses a session; this resets a *worldview*.
108[[context-budget]] for the token-layout side; [[agent-severance]] when the
109answer is offboarding, not bankruptcy.