Summary
When a Pi-backed Guided Review uses an API model whose account has no remaining credits, the provider error is not surfaced. Instead, Plannotator reports a misleading guide parsing failure:
[guide] Failed to parse output for job c5fa951f-1e32-4585-986a-67cd462960df
The same behavior was observed previously with job 49318521-4030-425d-8c60-c8d15499eb4e.
Reproduction
- Configure an API-backed Pi model on an account with no remaining API credits.
- Open a pull request using
/plannotator-review.
- Open Guided Review.
- Select the Pi engine and the no-credits API model.
- Generate the guide.
Tested with:
@plannotator/pi-extension 0.22.0
- Pi 0.80.6
- Guide engine: Pi
- Model:
codex-proxy/openai/gpt-5.5
- Thinking: medium
Actual behavior
The provider rejects the request because the account has no credits, but the visible/logged failure is:
[guide] Failed to parse output for job <uuid>
The underlying insufficient-credits error is lost, and the failure appears to be malformed guide JSON.
Expected behavior
The job should fail with the original provider error, for example:
Plannotator should not attempt to parse guide JSON after the underlying agent run has already failed.
Technical diagnosis
The relevant flow appears to be:
- Pi is launched in JSON mode by the marker-engine integration.
pi --mode json can exit with code 0 even when the agent run itself errors or is aborted. This behavior is already documented in piBuildArgv() in packages/server/marker-review.ts.
- Because the process exit code is 0, the agent-job handler invokes Guided Review result ingestion.
- The failed agent produced no complete nonce-delimited guide JSON block.
parseGuideMarkerOutput() returns null, and createGuideSession().onJobComplete() logs the generic parsing failure.
A normal replay using the same Pi/model configuration successfully produced a valid marker block, so this is error propagation for the no-credits path rather than a general Pi/Guide parser incompatibility.
Suggested regression coverage
Add a Pi NDJSON fixture where:
- the process exit code is 0;
- the assistant/provider event contains an error or error stop reason;
- no marker-delimited output exists.
Assert that the job surfaces the provider error and does not report Failed to parse output. The same handling may be relevant to Pi-backed code review jobs in addition to Guided Review.
Summary
When a Pi-backed Guided Review uses an API model whose account has no remaining credits, the provider error is not surfaced. Instead, Plannotator reports a misleading guide parsing failure:
The same behavior was observed previously with job
49318521-4030-425d-8c60-c8d15499eb4e.Reproduction
/plannotator-review.Tested with:
@plannotator/pi-extension0.22.0codex-proxy/openai/gpt-5.5Actual behavior
The provider rejects the request because the account has no credits, but the visible/logged failure is:
The underlying insufficient-credits error is lost, and the failure appears to be malformed guide JSON.
Expected behavior
The job should fail with the original provider error, for example:
Plannotator should not attempt to parse guide JSON after the underlying agent run has already failed.
Technical diagnosis
The relevant flow appears to be:
pi --mode jsoncan exit with code 0 even when the agent run itself errors or is aborted. This behavior is already documented inpiBuildArgv()inpackages/server/marker-review.ts.parseGuideMarkerOutput()returnsnull, andcreateGuideSession().onJobComplete()logs the generic parsing failure.A normal replay using the same Pi/model configuration successfully produced a valid marker block, so this is error propagation for the no-credits path rather than a general Pi/Guide parser incompatibility.
Suggested regression coverage
Add a Pi NDJSON fixture where:
Assert that the job surfaces the provider error and does not report
Failed to parse output. The same handling may be relevant to Pi-backed code review jobs in addition to Guided Review.