Compaction and third-party plugins
Claude Code can compact a session through its built-in path or through a function-hook plugin such as fast-jev-compaction. The distinction matters: a replacement-style plugin can answer session.compact itself and replace the transcript without calling Claude Code’s core compaction path.
What Loadout does during compaction
Section titled “What Loadout does during compaction”Loadout keeps its classic hooks in place for the core path. Sidequest’s PreCompact hook pins live board context for both auto and manual compactions. Its veto remains auto-only, so a user-requested /compact is never blocked. A replacement plugin can bypass both of those classic hooks when it does not call the next compaction handler.
The optional Sidequest function-hook guard covers that replacement path. When it is active and a compaction plugin is beneath Sidequest in the hook chain, it:
- passes the board recovery pin down to the next compaction handler;
- restores protected Sidequest dispatch and briefing tool results that the replacement truncated or dropped, keeping the restored messages in the transcript’s current parent chain; and
- leaves non-text results alone and uses retrieval pointers when a result exceeds the 32 KiB per-result or 64 KiB total restore budget.
The guard is disabled by default. Enable Claude Code function hooks and seat Sidequest outside the third-party plugin by putting this in your user settings:
{ "prependPlugins": ["sidequest@loadout"]}Set CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1 in the environment that starts Claude Code. Then configure Sidequest’s compactionGuard plugin option:
off(default) registers nothing and does not write compaction-guard state.autoactivates after the function-hook trace shows a non-core compaction plugin beneath Sidequest.onalways pins and restores against a replacement-style compaction.
A replacement compaction is identified by its empty compact summary. On the main session, the PostCompact and SessionStart hooks still run, but Codebase Mapper and Live Rules emit a short “history retained” note instead of reinjecting context that is already present verbatim. A normal summarized compaction keeps their usual re-grounding behavior. The function-hook guard protects dispatch and briefing results; it cannot recover an unspawned orchestrator result or an executor handle that was never retained.
Why autoCompactWindow matters
Section titled “Why autoCompactWindow matters”Quartermaster’s autoCompactWindow=200000 is an intentional cap for the Codex compaction point. With fast-jev-compaction set to 80%, that makes replacement compaction happen around 160K tokens, before Claude Code’s built-in threshold near 167K.
Do not remove that cap casually for [1m] or gateway models. Without it, 80% is roughly 736K–800K tokens against the advertised 920K–1M window. The Codex sentry may reject the larger request with HTTP 413 before compaction gets a chance to run. Use /context to check the effective cap after changing model or project settings.
Executor launch budget
Section titled “Executor launch budget”Every executor briefing now ends with a launch budget: the briefing’s size in characters and estimated tokens, its share of a 167K usable window, and its three largest sections. When the briefing alone passes 10% of that window, it also carries a warning. The executor is told to read only the sections it needs, and to record the measurement before releasing if the work cannot fit. A briefing large enough to move to a file reports that budget in the pointer, so the executor knows the cost before it reads.
The budget leaves out the ambient surface (system prompt, tool, skill, and agent listings, and the CLAUDE.md hierarchy). That is paid before the briefing arrives. On 2026-10-24, twenty Opus executors in one orchestrator session recorded 56K to 59K tokens on their first turn, about 35% of the window, before reading any briefing.
Session-level context monitors that read a statusline bridge file, such as GSD’s gsd-context-monitor, look the file up by session id. A subagent shares its parent’s session id, so every executor sees the orchestrator’s usage, not its own. On the same day, executors whose own usage was 57K were shown “CONTEXT CRITICAL: Usage at 100%” and told to ask the user how to proceed. The briefing now tells executors that this number belongs to the orchestrator and is no reason to hand back. If an executor does run out of its own context, its release reason starts with context exhaustion:, so the board can tell it apart from a planning blocker.
Keep TypeSafe credentials out of settings files
Section titled “Keep TypeSafe credentials out of settings files”The Sidequest compaction guard does not need a TypeSafe API key or any network request. If you separately enable a TypeSafe feature in the compaction plugin, keep TYPESAFE_API_KEY in a 1Password Secure Note named provider-typesafe (for example, the jev section with its token, scopes, and expiry), or use that plugin’s sensitive userConfig mechanism for runtime injection.
Never put the key in a stowed settings.json, commit it, or copy it into project configuration. Inject it only at runtime, and keep the ordinary Sidequest guard enabled without a key.