earendil-works/pi · error · Error
Compaction cancelled
Error message
Compaction cancelled
What it means
Error "Compaction cancelled" thrown in earendil-works/pi.
Source
Thrown at packages/coding-agent/src/core/agent-session.ts:1904
}
throw new Error("Nothing to compact (session too small)");
}
let extensionCompaction: CompactionResult | undefined;
if (this._extensionRunner.hasHandlers("session_before_compact")) {
const result = (await this._extensionRunner.emit({
type: "session_before_compact",
preparation,
branchEntries: pathEntries,
customInstructions,
reason: "manual",
willRetry: false,
signal: this._compactionAbortController.signal,
})) as SessionBeforeCompactResult | undefined;
if (result?.cancel) {
throw new Error("Compaction cancelled");
}
if (result?.compaction) {
extensionCompaction = result.compaction;
fromExtension = true;
}
}
let summary: string;
let firstKeptEntryId: string;
let tokensBefore: number;
let usage: Usage | undefined;
let details: unknown;
if (extensionCompaction) {
// Extension provided compaction content
summary = extensionCompaction.summary;
firstKeptEntryId = extensionCompaction.firstKeptEntryId;View on GitHub (pinned to 4af9d21d3b)
When it happens
Trigger: Thrown at packages/coding-agent/src/core/agent-session.ts:1904 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of earendil-works/pi@4af9d21d3b (2026-08-24).
Data as JSON: /api/errors/e12022351825d521.
Report an issue: GitHub.