earendil-works/pi · error · Error
Transformed eval system prompt must not be empty.
Error message
Transformed eval system prompt must not be empty.
What it means
runPiCodingAgent applied options.transformSystemPrompt to the session's system prompt and the result was empty/whitespace, which would leave the eval running without instructions.
Solutions
- Fix the transformSystemPrompt callback to return a non-empty string
- Return the default prompt unchanged instead of blanking it
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/evals/src/pi-harness.ts:156 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/1cede36fcc4bbf37.
Report an issue: GitHub.
Appendix: source
Thrown at packages/evals/src/pi-harness.ts:156
: {}),
});
signal?.throwIfAborted();
sessionManager = SessionManager.create(cwd, join(root, "sessions"));
setArtifact("runId", sessionManager.getSessionId());
session = (
await createAgentSessionFromServices({
services,
sessionManager,
model,
thinkingLevel: "off",
noTools: options.noTools,
})
).session;
const evalSession = session;
if (options.transformSystemPrompt) {
transformedSystemPrompt = options.transformSystemPrompt(evalSession.systemPrompt);
if (!transformedSystemPrompt.trim()) throw new Error("Transformed eval system prompt must not be empty.");
await evalSession.reload();
}
let abortPromise: Promise<void> | undefined;
const abort = () => {
abortPromise ??= evalSession.abort();
};
signal?.addEventListener("abort", abort, { once: true });
try {
signal?.throwIfAborted();
if (evalSession.extensionRunner.getExtensionPaths().length !== 0) {
throw new Error("Expected an isolated eval session to start without extensions.");
}
const steps = typeof input === "string" ? [{ type: "prompt" as const, content: input }] : input;
let response: string | undefined;
for (const step of steps) {
if (step.type === "prompt") {
response = await promptAgent(evalSession, step.content, signal);
} else {View on GitHub (pinned to 4af9d21d3b)