can1357/oh-my-pi · error · Error
Checker discovery failed: ${result.result.error}
Error message
Checker discovery failed: ${result.result.error} What it means
The cleanse checker-discovery step runs an LLM prompt with a DISCOVERY_SCHEMA and, if the agent result carries result.error (the sub-agent failed — API error, aborted, invalid response), wraps it in 'Checker discovery failed: ...'. It means discovery could not produce checker specs, not that checkers themselves are broken.
Source
Thrown at packages/coding-agent/src/cleanse/agent.ts:143
return {
model: modelDisplay,
sessionFile,
async discoverCheckers(request: string, signal?: AbortSignal): Promise<CustomCleanseCheckerSpec[]> {
sessionManager.appendCustomEntry("cleanse_discovery", { request });
const result = await runStructuredSubagent({
session: toolSession,
invocationKind: "task",
assignment: prompt.render(discoveryPrompt, { request }),
agent: "task",
model: modelSelector,
outputSchema: DISCOVERY_SCHEMA,
identity: { label: "CleanseDiscovery" },
enableLsp: true,
enableIrc: false,
signal,
});
if (result.result.error) throw new Error(`Checker discovery failed: ${result.result.error}`);
return parseDiscoverySpecs(result.result.structuredOutput?.data);
},
async dispatchWorker(
assignment: CleanseAssignment,
context: {
worker: number;
peers: readonly CleanseAssignment[];
checkers: readonly CleanseCheckerDescriptor[];
},
signal?: AbortSignal,
): Promise<CleanseAgentOutcome> {
sessionManager.appendCustomEntry("cleanse_dispatch", {
worker: context.worker,
weight: assignment.weight,
files: assignment.groups.map(group => group.file ?? "<project>"),
});
const name = `CleanseA${context.worker}`;
options.hooks?.onStart?.(name, assignment);View on GitHub (pinned to 9690622007)
Solutions
- Read the embedded result.error text to identify the root cause (auth vs rate limit vs abort)
- Re-run cleanse once transient errors/rate limits clear; check provider status if persistent
- Verify the configured cleanse model's provider auth is valid and the model is available
- Increase the discovery timeout / avoid cancelling so the signal doesn't abort mid-run
Defensive patterns
Strategy: retry
Validate before calling
// preflight: verify provider auth before discovery
const auth = await discoverAuthStorage();
if (!auth.get(model.provider)) throw new Error(`provider ${model.provider} not authenticated; cleanse discovery would fail`); Try / catch
try {
const specs = await discoverCheckers(signal);
return specs;
} catch (err) {
if (err instanceof Error && err.message.startsWith('Checker discovery failed')) {
if (!signal.aborted) {
await Bun.sleep(2000);
return discoverCheckers(signal); // one retry for transient API errors
}
}
throw err;
} Prevention
- Validate provider auth/model availability before starting cleanse
- Respect rate limits; stagger parallel discovery runs
- Use a reliable model for discovery, not an experimental one
- Handle SIGINT/timeouts so the signal abort is distinguished from real failures
When it happens
Trigger: The discovery agent run returns { error } — provider API failure, rate limit, auth failure, signal abort (timeout/cancel), or the model failed to produce a valid structured output.
Common situations: Expired/missing API credentials for the cleanse model; rate limits during parallel discovery; network outage; discovery model returning malformed structured output that the runtime reports as an error.
Related errors
- AI staging request failed: ${response.errorMessage ?? "unkno
- GPT-5 Harmony leak persisted after ${harmonyRetryAttempt} re
- Soft tool requirement '${softRequiredTool}' was not satisfie
- exceptionType
- code
AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31).
Data as JSON: /api/errors/ce2d69b297b908cc.
Report an issue: GitHub.