Compact resume

From the-agency-ai/the-agency · View interactive version

Compact resume is an AI agent skill from the GitHub repository the-agency-ai/the-agency. Post-compact pickup — read continuation handoff, verify state (tree clean, monitors alive, dispatch drift), resume next-action.

How to use this skill

Skill file

<!--

Flag #62/#63: allowed-tools removed. Inherits Bash(*) from

.claude/settings.json. Restricting to specific subcommand patterns at the

skill level silently blocks agents on permission prompts the agent cannot

see — see dispatch #171 for the devex incident that surfaced this trap.

-->

Compact Resume

Why this exists

/compact collapses the conversation to a summary. The summary is lossy — subtle context (decisions in flight, half-finished reasoning, tool-call state) may not survive the compression. The /compact-prepare + /compact-resume pair holds the line:

This is the PICKUP-for-compact surface. It shells to agency/tools/session-pickup --from compact. Paired with /compact-prepare on the other side.

Required reading

Usage

/compact-resume

No arguments. The skill is self-contained — it reads the current handoff, verifies state, reports, and hands control back to the agent to resume the next-action.

Preconditions

  1. You just ran /compact. The handoff file exists from the immediately-prior /compact-prepare.
  2. The working tree should be clean — if it's dirty, the skill reports tree_state=dirty and blocks. Compact doesn't modify the working tree, so dirty means something else happened in the background.
  3. agency/tools/session-pickup is installed (framework tool; landed in session-lifecycle-refactor Phase 2).

Flow / Steps

Step 1: Run session-pickup primitive

./agency/tools/session-pickup --from compact

--from compact is the right mode post-compact — skips worktree-sync (master cannot have moved during in-process compaction) and skips full preflight (this is the same process, not a fresh session).

Parse the emitted key=value output. Fields to surface to the user:

Step 2: Handle status

Step 3: Re-launch dead monitors

For each monitor_health_* = dead, re-launch the corresponding monitor. The canonical way is via the monitor skills, NOT by calling monitor-register directly:

For unknown, the monitor type isn't registered — probably wasn't running before compact. Leave it alone unless the agent wants it now.

Step 4: Surface dispatch drift

If dispatches_drift_since_pause > 0, list the drifted dispatches:

./agency/tools/dispatch list --status unread

These are dispatches that arrived between the PAUSE commit and now. Read any that look relevant before resuming the task (an unread dispatch is a blocked person — the standing priority applies).

Step 5: Report and hand off

Report to the user in a tight summary:

Then resume. The next-action from the handoff IS the task — pick it up and go.

Failure modes

What this does NOT do

Status

active (v2, shipped session-lifecycle-refactor Phase 3 Iteration 3.2). Paired with /compact-prepare, /session-end, /session-resume.

Related

OFFENDERS WILL BE FED TO THE — CUTE — ATTACK KITTENS!

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.