can1357/oh-my-pi · error

No configured compaction method can run manually.

Error message

No configured compaction method can run manually.

What it means

Thrown when the ordered list of configured compaction methods (`compaction.methodOrder`, possibly overridden by the compact mode) yields no method eligible to run manually. Each method has applicability conditions (e.g. `remote` requires a reachable server endpoint configuration; methods may be filtered by manual-run rules); if all configured methods are filtered out, nothing can execute.

Source

Thrown at packages/coding-agent/src/session/session-maintenance.ts:789

				if (method === "snapcompact") {
					if (
						explicitSnapcompact ||
						(!customInstructions && !options?.internalGuidance && activeModel.input.includes("image"))
					) {
						selectedMethod = method;
						selectedMethodIndex = index;
						break;
					}
					continue;
				}
				if (method === "soft") {
					selectedMethod = method;
					selectedMethodIndex = index;
					break;
				}
			}
			if (!selectedMethod) {
				throw new Error("No configured compaction method can run manually.");
			}

			const effectiveSettings = resolveMethodSettings(compactionSettings, selectedMethod);
			const availableModels = this.#host.modelRegistry.getAvailable();
			const requireProviderRemote = selectedMethod === "remote" && !effectiveSettings.remoteEndpoint;
			const compactionCandidates = this.#getCompactionModelCandidates(
				availableModels,
				requireProviderRemote
					? candidate =>
							candidate.provider === activeModel.provider &&
							shouldUseProviderNativeCompaction(candidate, effectiveSettings)
					: undefined,
			);
			if (requireProviderRemote && compactionCandidates.length === 0) {
				this.#host.emitNotice(
					"warning",
					`remote compaction is unavailable for ${activeModel.id}; trying the next preferred method`,
					"compaction",

View on GitHub (pinned to 9690622007)

Solutions

  1. Add a locally runnable method to `compaction.methodOrder` (e.g. include `"soft"`).
  2. If you intend remote compaction, configure the remote endpoint/settings so the remote method is eligible.
  3. Reset compaction settings to defaults to restore a workable methodOrder.

Example fix

// before (settings.json)
{ "compaction": { "methodOrder": ["remote"] } }
// after
{ "compaction": { "methodOrder": ["remote", "soft"] } }
Defensive patterns

Strategy: validation

Validate before calling

const order = compactMode?.overrides.methodOrder ?? settings.getGroup("compaction").methodOrder;
if (!order.some(m => m === "soft" || m === "remote")) {
  throw new Error("methodOrder has no manually runnable method; include 'soft' or configure remote");
}

Try / catch

try {
  await session.compact();
} catch (err) {
  if (err instanceof Error && err.message.includes("No configured compaction method")) {
    settings.getGroup("compaction").methodOrder = ["remote", "soft"];
    await session.compact();
    return;
  }
  throw err;
}

Prevention

When it happens

Trigger: Running manual compaction when `compaction.methodOrder` contains only methods that fail their manual-run preconditions — classically a methodOrder of just `remote` with no usable remote endpoint, or a custom methodOrder whose entries are all skipped by the availability checks in the loop just above the throw.

Common situations: Configuring `"methodOrder": ["remote"]` without a remote compaction server set up; a custom settings file pruning methods after an upgrade renamed/removed one; using a compact mode override that intersects with settings to an empty/unusable set.

Related errors


AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31). Data as JSON: /api/errors/bc7aaf78ac6b405c. Report an issue: GitHub.