Skip to content
Back to skills

Pre Compact

BSecurity

Prepare THIS session for an owner-run /compact — bank the seat's state in the working plan (in-flight builders, uncommitted work with content keys, open mail loops, the next numbered step, the scratch files to reopen), sync the plan, and say it is ready; with `--wait`, save now, wait for every running helper and background job to land, save again, and only then say ready; by default also take the inbound-mail listener (and a review hub's staleness poller and usage watch) down until the recove...

  • 14 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 7, 2026
ai-agentspythongoshellbashnodegit

Security analysis

B75/100
  • criticalSends environment variables or credentials to an external URL

Pro shows the line behind each finding and how to fix it

Scanned November 24, 2026

npx -y skills add brkomir/anja --skill pre-compact --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Pre Compact?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Pre Compact
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/brkomir-pre-compact/badge)](https://www.skillsdirectory.com/skills/brkomir-pre-compact)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: pre-compact
description: Prepare THIS session for an owner-run /compact — bank the seat's state in the working plan (in-flight builders, uncommitted work with content keys, open mail loops, the next numbered step, the scratch files to reopen), sync the plan, and say it is ready; with `--wait`, save now, wait for every running helper and background job to land, save again, and only then say ready; by default also take the inbound-mail listener (and a review hub's staleness poller and usage watch) down until the recovery after the compaction re-arms it, and with `--keep-listening` leave them running (`--disarm` is still accepted and now changes nothing); with `--pause`, enter `/pause` first, the same as `/pause --compact`. Use when the owner says a compaction is about to happen, or asks to "prepare for compact", or when the AUTO PRE-COMPACT hook directs it (~30,000 tokens before an automatic compaction, where switched on). Owner-invoked, hook-directed (an `AUTO PRE-COMPACT` line the hook put in this context) or run by `/wrap` Step 2's status-line headroom read; never the seat's own estimate of its size, never otherwise self-started; writes the working plan only, never commits, never resumes held work.
---

# /pre-compact — leave the seat in a state a compaction cannot lose

The command codifies a preparation first done by hand: disarming the mail listener is a parameter, `--disarm`, and without it the listener stays on; either way the recovery after the compaction re-arms it. The founding instance ran by hand on a paused seat: the listener stopped and confirmed dead, a dated block written into the working plan naming the pause, the banked reader, the hub's dispositioned verdict and the files to reopen, the plan synced, one line back saying ready.

## Why a command, and why these acts

`/post-compact` rebuilds a seat's state after the compaction from the transcript index and the working plan. It is only as good as what the plan carried when the summary was cut, and two things reliably go wrong at that moment:

- **The listener (down by default; `--keep-listening` keeps it).** A typed `/pre-compact` takes the listener down first (under `--wait`, at the final save): a seat about to be compacted should not spend turns on inbound mail before the compaction, and a turn the listener starts between the owner's `/pre-compact` and `/compact` can land before a model or account switch. `--keep-listening` (alias `--keep-alive`; the name says what it keeps, since keep-warm already means the cache) leaves it armed, which was the earlier default; `--disarm` is still accepted and changes nothing. The runs the owner does not follow with a `/compact` keep listening: the AUTO hook line and `/wrap` Step 2 pass `--keep-listening` (§ Automatic trigger, § Boundaries), because the seat carries on working. Either way the listener is ON again after the compaction: `/post-compact` step 5 re-arms a dead one on the first turn after the summary (its exceptions: a standby marker, and a setup that switched the listener off with `SKIP_MAIL_LISTEN_ARM_REMINDER=1`). What disarming buys is a KNOWN state — a compaction can kill a listener silently or a resume can leave two, both measured in the orchestrator doctrine — and no mail landing in a context about to be summarised.
- **The hand-off state.** The summary is an index, not evidence. A builder still running, a hand-back banked but unverified, an uncommitted edit in the shared tree, a verdict read but not folded, a question put to the owner and not answered — each survives only if the plan names it, with a content key the recovery can re-check rather than a status word.

## Process — `/pre-compact [--keep-listening] [--fleet] [--pause] [--wait]` (`--fleet`: each other open seat that takes a turn within 10 minutes; § Boundaries and `pause/SKILL.md` § Fleet; `--wait`: save now, wait for every running helper and background job, save again, then say ready)

**`--wait`:** steps 0-4 run NOW as the FIRST SAVE, with two differences: the block's heading carries ` (--wait, first save; N helpers and M background jobs outstanding)` with the counts from step 0 (`ListAgents` for this session's in-process helpers; the Bash tool's own background tasks for the jobs: a test tier, a build, a paid run; read from this context's own `run_in_background` calls with no completion notice yet, since no log records them, and never the listener, poller or usage watch, which stay up), and the listener (and a hub's poller and usage watch) STAYS UP until the final save, because the seat is awake and attended for the whole wait and a mail landing in it is read and dispositioned as usual (with `--keep-listening` it stays up through both saves). Step 4's readout then says: saved, waiting on the N helpers and M jobs by name, do not `/compact` yet, the final save and "ready" come when the last one lands, and a `/compact` now is not refused and compacts on the first save: nothing else ends a wait that a stalled helper or job holds open. A helper `ListAgents` shows stopped or failed has landed. Then the seat starts NOTHING new: it answers the owner, dispositions inbound mail without starting work on it (a request for new work, a review request on a hub included, is acknowledged and banked as an open loop for after the compaction, never dispatched; an order of the owner's to start work is the owner's to give, and what it starts joins the wait), and on each hand-back or job notification re-reads `ListAgents` and its background tasks; the first save's NEXT STEP reads `--wait open: final save when <names> land`, so a recovery from an automatic compaction during the wait knows the final save is still owed; a hand-back is banked into the plan as it lands (its files, its readings, its content key; verified and committed only if the owner's standing order already called for it before the `--wait`). When the last helper and job have landed, steps 1-4 run again as the FINAL SAVE: the listener goes down (the default), a fresh `## PRE-COMPACT — <UTC> (--wait, final save)` block is written below the first (never edited into it: `/post-compact` reads the newest heading), the plan is synced and checked, and only that readout says ready for `/compact`. A `/compact` the owner types during the wait is NOT refused by `precompact-save-guard.py` (the first save's heading is on record and that is the right reading: it is the owner's choice to cut the wait); the hand-backs then land after the compaction, and the recovery finds them in flight in the first save and takes each as it lands, as it would any running builder's. With nothing outstanding at step 0, `--wait` adds nothing: one save, headed as usual, and the readout says so. `--wait` with `--pause`: the pause banks every hand-back itself and holds the work, so `--wait` adds nothing; it is dropped and the readout says so. `--wait` with `--fleet`: travels as typed, like every flag. The AUTO hook line never carries `--wait` (an automatic compaction waits for nobody), and `/wrap` Step 2 never passes it.

**`--pause` (both routes exist, and the listener flags mean the same on each):** this command then runs `/pause --compact` through the Skill tool, with `--keep-listening` when given, and does nothing else itself (but a `--fleet`'s wake mail, § Boundaries): `/pause` enters the pause and runs this command again without `--pause` (`pause/SKILL.md` § Fleet and compact forms), so the work holds and the seat is banked in one turn. `--resume` and `--cold` are `/pause --compact`'s: typed here they are not passed on, and the readout says so. Typed with `--fleet`, the other seats get it as `/pre-compact --pause` (plus `--keep-listening` when typed) and take the same route. Without `--pause`, steps 0-4 run as written and this command holds nothing.

0. **Preconditions, stated.** `ListAgents` plus this session's rows in `.claude/logs/subagent-dispatch.jsonl` give the in-flight builders (the log, not recall). Read the markers: `session-pause-<sid8>` (a pause keeps holding; this command changes nothing about it), `session-standby-<sid8>` (it cannot still be standing: this command is the owner's message, so `standby-resume-check.sh` has already directed `/standby resume` — marker cleared, listener re-armed — and the seat is awake by step 1; to keep it parked through the compaction, the owner runs `/standby` after this and BEFORE `/compact` — the order is `/pre-compact`, `/standby`, `/compact`; a `/standby` sent after the compaction lands on a freshly compacted seat, whose turn runs the recovery first and re-arms the listener only for `/standby` to stop it again, so a readout never tells the owner "`/compact`, then `/standby`"), `review-hub-active-<sid8>` (a hub says so in its readout; peers keep mailing it). Nothing is stopped except the listener (and a hub's staleness poller and usage watch), and with `--keep-listening` not even those: builders finish and hand back on their own, background shells keep running.
1. **The listener (and on a hub, the staleness poller and any usage watch).** With `--wait`, on the FIRST save: leave everything armed and say the disarm comes at the final save (§ `--wait` above); the rest of this step is the final save's. With `--keep-listening`: leave it armed and say so (a dead one is re-armed as usual, now; never in an UNATTENDED RUN). By default (and with `--disarm`, which changes nothing): `TaskStop` the mail-listen Monitor task; then `kill -0 "$(cat .claude/state/mail-listen-<sid8>.pid)"` must FAIL — a stale pid file reads live under `[ -f ]`, so the verdict is the kill test, not the file. Say it is dead, and say when it comes back: the recovery after the compaction re-arms it. On a review hub (`review-hub-active-<sid8>`), write the hub's own arm command into the block — `mail-listen --poll 30 --rebroadcast-hours 48` (`review-hub/SKILL.md` Phase 1) — because every post-compaction arm directive prints the bare one. **A hub has a second Monitor, the staleness poller (`review-hub/SKILL.md` Phase 1), and the default stops it too**, and the recovery after a compaction turns it back on, the same way it does the listener: bank its arm command first (below), then `TaskStop` it, then `pgrep -P $PPID -f '[h]ub-stale-request-poll'` must print nothing (`-P $PPID` keeps a peer hub's poller on the same box out of the answer; never `pkill` by pattern, which would kill the peer's alarm too). An earlier version of this step left the poller running, since no recovery step brought a stopped one back; that step now exists. With `--keep-listening` the poller stays armed. **A hub that armed a usage watch (`review-hub/SKILL.md` § ⏸ `/review-hub --pause`, step 6, whose plan line reads `usage watch armed: --pause-at N`, or a resume watch of steps 7-7b) has a THIRD Monitor, and the default stops it too** (an earlier version of this step left it running, and a watch that fires wakes the seat): say in the block that it was stopped (step 2), then `TaskStop` it, then `pgrep -P $PPID -f '[h]ub-usage-watch'` must print nothing. Its command is not banked: `/post-compact` step 5 re-arms a dead watch by § ⏸ step 9, which rebuilds it from the pause marker or the plan line, so with no pause marker and no `usage watch armed:` line in the plan, write that line (step 6's) before stopping it, or nothing brings it back. With `--keep-listening` the usage watch stays armed, and it too dies on its own at the Monitor's 30-minute cap; the same step 5 line re-arms it. **On a hub, disarmed or kept listening, write the poller's arm command into the block, with `timeout_ms: 1800000` beside it** — read it FIRST from this session's own transcript, which survives a compaction (a context, or a bank, may not) and is the only source that holds the NEWEST arm: in a Bash call that runs nothing else, with `grep -F` ahead of the parse, so the parse reads only the lines that can match: `LC_ALL=C /usr/bin/grep -a -F 'hub-stale-request-poll' ~/.claude/projects/<project-key>/$CLAUDE_CODE_SESSION_ID.jsonl | python3 -I -c 'import json,sys;c=[b["input"]["command"] for l in sys.stdin for b in ((json.loads(l).get("message") or {}).get("content") or []) if isinstance(b,dict) and b.get("name")=="Monitor" and "hub-stale-request-poll" in b.get("input",{}).get("command","")];print(c[-1] if c else "NO-ARM")'` (measured 2026-10-30 on a hub's 287 MB transcript: 2 s, output byte-identical to the whole-file parse). Only if that call errors or moves to the background, bank the newest banked copy instead — the scratchpad bank file (`poller-bank.txt`, rewritten at each arm by habit on one hub; no step writes it), else the poller line of the plan's last `PRE-COMPACT` block — and say in the block which source it came from and that it may be older than the live arm (that session changed its filter list 30 times over 366 arms). The scan runs first and the banked copy is only the fallback (measured 2026-10-26 10:47Z on a hub: a bank call holding the scan and seven other commands never returned on a ~113 MB transcript, the bank's append never ran and the `/compact` that followed was refused; which leg stalled is unmeasured). Keep the arm's `grep -v` filter lines included; never reconstruct it from `ps`, which returns the harness's shell wrapper (a snapshot `source` and an `eval '…'` with every quote re-escaped), not the command. `NO-ARM` ⇒ bank Phase 1's loop and say its filters are lost. ⛔ **Bank, and re-arm, the loop TEXT itself — never a `bash <file>` that holds it**: the `pgrep` check above, `/post-compact` step 5's liveness check and this extractor all key on the string `hub-stale-request-poll` in the Monitor's own command, which a file-form arm does not carry (the usage watch's check keys on `hub-usage-watch` the same way). Measured 2026-10-23 on a hub re-armed after a compaction as `bash <scratch>/poller-cmd17.txt`: the check printed nothing (read as stopped) while that alarm was running and fired seconds later, so a recovery would have armed a second copy (double alerts), and the extractor would have banked an older arm. Inline, the same check printed its pid. Why: `/post-compact` step 5 re-arms a dead poller from the bank and otherwise falls back to Phase 1's bare loop, which re-fires every row the hub had filtered out; and a poller dies on its own at the Monitor's 30-minute cap, so an automatic compaction after an AUTO run (`--keep-listening`) can find it dead too. The standing arm-the-listener directive re-injects every turn until then; the disarm, the default, overrides it for those turns.
2. **Bank the state — one dated `PRE-COMPACT` block in the working plan, outside the `SUMMARY-SYNC` fence** (`grep -n -F 'SUMMARY-SYNC' <plan>` prints both fence lines; write below the second). ⛔ **Head it exactly `## PRE-COMPACT — <date -u +%FT%TZ>`** (then ` (AUTO)` when the hook directed it, or the owner's flags; under `--wait`, ` (--wait, first save; N helpers and M background jobs outstanding)` and later ` (--wait, final save)`, two blocks, the final one newest): `/post-compact` finds the bank by that heading and its UTC time, and a heading with no time cannot be placed, so the recovery falls back to the full rebuild. Every timestamp DERIVED (`date -u`, a mail file's `created:`, `git log --format=%ct`), never typed. The block carries:
   - the owner's words, verbatim; HEAD; this seat's commits since its last readout;
   - each in-flight builder — name, what it builds, the files it holds, running or handed back and banked (agent ids stay in a session-private scratch file, never in the plan);
   - every uncommitted edit of this seat — `git diff --numstat` on its paths and ONE content key per unit (`grep -cF '<a line only that edit holds>' <file>`; when the file is the plan itself, put a `''` inside the quoted key (`grep -cF 'flipped at the'' 22:21Z recovery' <plan>`) — the shell joins it back, so the count is the edit's alone and no bank or later block quoting the command can match it — count it over the plan and its part files (`cat <plan stem>*.md | grep -cF …`, because step 3's sync can roll the keyed line into a part), and key the edit, never this block's own heading. A plain key counted its own quotation in the first-written count of 3 banks: 2026-10-14 19:02Z, and 2026-10-27 21:51Z and 22:23Z; only the 21:51Z one still read wrong when the recovery checked it), so the recovery can tell "still in the tree" from "swept into a peer's commit" from "lost";
   - the open mail loops: requests sent and the verdict owed, verdicts read and their dispositions, holds standing; and whenever the listener is down (disarmed or dead), the store's unread count from the header of `python3 scripts/session-manifest.py mail-check --peek`, never "nothing waiting" from memory (measured 2026-10-26 14:07Z: a bank written under a disarmed pause said nothing was waiting while 3 review requests sat unread, about 3.5 h);
   - what the owner has been asked and has not answered;
   - the NEXT STEP as a numbered order (or a pointer to the pause block's resume order when one exists), and whether the listener (and on a hub, the poller and any usage watch) was disarmed or kept listening (so the recovery knows to re-arm it);
   - the scratch files and patches to reopen, by path;
   - on a hub, the poller's arm command with `timeout_ms: 1800000` beside it (step 1).
3. **Sync and check the plan.** `node scripts/summary-plan-sync.mjs`; `git ls-files --error-unmatch <plan>` (untracked ⇒ say the plan is unprotected); `git status --short -- '<plan stem>-part*.md'`, quoted (an unquoted glob aborts in zsh when the plan has no part), and every `??` part it lists, which the sync's line also names as `part file(s) NOT TRACKED`, goes under the bank's uncommitted edits, to be committed with the plan, never the plan alone; the heading diff against HEAD (`diff <(git show HEAD:<plan> | grep '^#\+ ') <(grep '^#\+ ' <plan>)`) — `<` lines are destruction, stop and restore.
4. **Readout, one short block, in the owner's register** (under `--wait`, the first save's readout instead names the helpers and jobs still running and says do not `/compact` yet; what follows is the final save's, and every one-save run's): the listener's state (armed, or disarmed and re-armed by the recovery), and on a hub the poller's and any usage watch's too; what the plan now carries (builders, uncommitted work, loops, next step); what the recovery will do after the compaction (`/post-compact` on the first turn; a pause keeps holding); that the owner's next move is `/compact` — or, when the owner wants the seat parked through it, `/standby` and then `/compact` (step 0) — and, when the work after it needs a model switch (`/model opus`, plus `/effort high` before a `/wrap`; or `/model fable` back), that the switch comes after the compaction, never before. Say that keep-warm stops at the `/compact` — by design, whether or not the listener was disarmed (a compaction is how the owner switches accounts, waits out a limit or switches models: `pause/SKILL.md` step 6b) — and never quote a "warm until" time past the `/compact`. Say the session then waits for the owner's next message only when disarmed (the default): with `--keep-listening` the listener stays armed, so a peer's mail can wake the seat and run the recovery first, possibly before a model or account switch (the reasons for disarming: so listeners do not wake the session, and § Why). No plan table. **When the hook directed it (AUTO):** one line instead — the bank is written, the automatic compaction will land on its own, `/post-compact` will start from this block — then carry on with the work the hook interrupted; there is no `/compact` to ask the owner for.

## Automatic trigger

The rule: run `/pre-compact` automatically when the context nears the automatic compaction (about 96% of it), and optimise for the save running close to that point, not for how large a command fits in the window left; a save the compaction cuts off is acceptable. `/post-compact` checks whether a save ran: if it did, the recovery starts from the bank and has less to do; if not, it rebuilds as before.

- **The hook:** `.claude/hooks/auto-precompact-trigger.py` (PostToolUse on every tool, and UserPromptSubmit). When the tokens left before the compaction point fall to 30,000 or fewer, it puts one `⏳ AUTO PRE-COMPACT` line in the seat's context, once per crossing; the seat runs this command through the Skill tool, with `--keep-listening` (the hook line says so; the work carries on and no `/compact` of the owner's follows), before anything else in that turn. The size is the newest main-chain reply's usage in the transcript; the compaction point is `compact_threshold` from the status-line file.
- **Why 30,000:** the save's own cost, measured 2026-10-13 over the 46 `/pre-compact` runs in this project's transcripts (command to the end of its turn): min 3,509, median 8,422, max 23,629 tokens. 30,000 is about 96% of a 727,000 compaction point; it does not always cover the save, because the reading moves one model call at a time and lags by the tool results since then: replayed over this project's transcripts, a median-cost save misses on ~10% of crossings, the largest on ~41% (40,000 -> ~6%, 50,000 -> ~3.5%). The design runs close to the compaction. A save the compaction still cuts off costs its own tokens and nothing else: `/post-compact` finds no fresh bank and rebuilds in full. `AUTO_PRECOMPACT_HEADROOM` in the settings env block moves it.
- **Switched on per session:** `.claude/state/auto-precompact-pilot-<sid8>` (one session) or `.claude/state/auto-precompact-enabled` (every session, with the headroom at 30,000; the marker is gitignored local state, so it reaches this checkout only); `auto-precompact-off-<sid8>` opts one session out. Off for everyone: delete the marker and any `auto-precompact-pilot-<sid8>` marker (read on every call), or `SKIP_AUTO_PRECOMPACT=1` in the settings env block (read at each session's next launch). Never for a sub-agent, a `[keep-warm]` ping, or a seat parked by `/standby`. Fires: `.claude/logs/auto-precompact-fires.jsonl`.

## Boundaries

- **Owner-invoked, directed by the AUTO PRE-COMPACT hook, or directed by a FLEET directive, or run by `/wrap` Step 2's headroom read before a `/meta` call — nothing else.** A fleet directive is the hook's `⏳ FLEET PRE-COMPACT` line: the owner typed `/pre-compact --fleet [--keep-listening] [--pause] [--wait]` in another session (the owner's own typed record, checked by `.claude/hooks/fleet_verb.py`; § Fleet in `pause/SKILL.md` has the whole mechanism), and this seat runs `/pre-compact` with the same flags minus `--fleet`, as if the owner had typed it here (no `(AUTO)` on the heading). Typed here WITH `--fleet`: run the save here, then send the one wake mail that § describes. Hook-directed (AUTO) means the hook's `⏳ AUTO PRE-COMPACT` line is in this context and `.claude/state/auto-precompact-fired-<sid8>` exists; a seat's own reading of its context size is never the hook, and `(AUTO)` goes on the heading only then. A `/wrap` Step 2 run passes `--keep-listening`, heads the block ` (WRAP)`, gives step 4's AUTO one-line readout (no `/compact` to ask for), and is the one seat-side reading this command accepts: the wrap's command reads the measured status line, never an estimate. A seat never decides on its own to prepare a compaction; an automatic compaction the hook did not catch gets the recovery, not this.
- **Writes the working plan and nothing else.** No commit (a paused seat does not commit, and outside a pause a commit is the work's own step, not a compaction's), no mail except the one wake mail of a `--fleet` typed here (`pause/SKILL.md` § Fleet), no tracker or memory write, no `/meta learn`. A session that holds unpersisted decisions says so in the readout; `/wrap --checkpoint` is the owner's call.
- **A `/compact` typed before the bank lands is refused ONCE**: `compact-save.sh` runs `.claude/hooks/precompact-save-guard.py` first, which blocks a MANUAL compaction when this session's newest `/pre-compact` request (typed by the owner, or run for the owner by a FLEET or AUTO hook line) is under 10 minutes old and no `## PRE-COMPACT` heading in its plans is at or after it; the refusal writes no checkpoint and no post-compact-pending marker (only the guard's own once-marker and its fires line), and any manual `/compact` in the 10 minutes after a refusal goes through (at most one refusal per 10 minutes). An automatic compaction is never refused. Founding race: a `/compact` 6 s after `/pre-compact`, no bank. Not yet seen firing on a real compaction (the tests drive the real hook in a throwaway folder); fires: `.claude/logs/precompact-save-guard-fires.jsonl`.
- **Not `/pause`:** it holds nothing and running builders keep running, unless `--pause` was given, which routes through `/pause --compact` (§ Process). **Not `/standby`:** the seat stays awake and answers the owner.
- **The listener's return is `/post-compact`'s step:** it re-arms a dead listener on the first turn after the compaction unless a standby marker exists (a parked seat stays deaf) or the listener is switched off (`SKIP_MAIL_LISTEN_ARM_REMINDER=1`). When the owner's `/compact <focus>` lets the recovery be skipped, `session-start.sh`'s arm directive (source-agnostic: dead pid, no standby marker, the switch unset) and `mail-listen-arm-reminder.sh` still bring it back on that turn. A paused seat gets it back then too — `/pause` keeps the listener on while paused. **A hub's poller has no such second path:** after a disarm (the default), a skipped recovery leaves it dead until the hub re-arms it by hand (`review-hub/SKILL.md` Phase 1, or the bank's line), so the readout says a `/compact <focus>` would leave it down.

## Revisit

- *(Done 2026-10-13, at 46 uses: `/post-compact` now starts from a FRESH bank — `scripts/post-compact-recovery-index.py`'s `bank` field — confirming the block's items instead of searching from nothing; it still reads every owner record in the window.)* With the fleet switch on, every session's fires count toward five, but only a fire followed by an AUTOMATIC compaction (a manual `/compact`, or none, tests nothing about the headroom); read each fire as it lands and show it to the owner: the fire reading from `auto-precompact-fires.jsonl`, the margin when the bank LANDED from the transcript's usage on the record that writes it, whether the compaction after it cut the bank off, and how much work came after the bank (the last main-chain usage before the compaction less the bank's: what the recovery still rebuilds without it; on an automatic compaction this is close to the landing margin seen from the other side, off by the threshold minus that last reading, which takes either sign (+674 at the first fire; -1,150 at one 2026-10-13 automatic compaction whose last reading overshot the threshold), so a wider margin buys safety with an older bank). The first fired 2026-10-13T19:11:14Z at 21,537 left; its bank landed at 19:11:47Z with 13,836 left and was intact at the compaction 34 minutes later, with 13,162 tokens of work after it. One cut off ⇒ raise the headroom; every bank among the five landing with more than 20,000 to spare ⇒ lower it. Both are set (headroom 30,000, fleet switch on); only those two evidence rules reopen the headroom. ⛔ **The first cut-off did NOT raise it:** one fire landed 7,489 tokens past the point (one step jumped 46,122, a path-scoped rules file loading), and the headroom stayed at 30,000: a missed save loses nothing the recovery cannot rebuild, it only costs more. So a cut-off is a COUNT, not a trigger: past-point fires and no-save recoveries are tracked and shown to the owner at the re-check.
- If a compaction ever lands with a `PRE-COMPACT` block older than the last `OWNER PAUSE` or readout block, the bank was stale when the summary cut: add a freshness check to step 3 (the block's timestamp is the plan's newest).

**Marker:** `[pre-compact]` on the turn that runs it.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.