fix(runner): surface Pi provider errors instead of "The agent produced no output" - #5317
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
Railway Preview Environment
|
…d no output" Commit 42075a5 moved Pi session transcripts to <cwd>/agents/sessions/pi via PI_CODING_AGENT_SESSION_DIR, but findSwallowedPiError was still passed the Pi agent dir, which no longer holds the transcript. The helper found nothing, so every provider failure (bad key, quota, model 404) fell back to the generic "The agent produced no output." message. findSwallowedPiError now takes the run cwd and derives the transcript location from piSessionWorkspaceDir, the same shared helper configurePiSessionWorkspace uses to point Pi at it, so the reader and the writer can never disagree again. Claude-Session: https://claude.ai/code/session_01Hyn9365BLPXDmNZShrQkmH
e8c0669 to
145a662
Compare
Context
Any Pi harness provider failure (bad API key, out of quota, model 404) reached the end user as the generic message "The agent produced no output." The real provider error was discarded, so users had no idea what actually went wrong.
Root cause: commit
42075a5e9fmoved Pi session transcripts from the Pi agent dir to<cwd>/agents/sessions/pi/(viaPI_CODING_AGENT_SESSION_DIR), but did not update the caller offindSwallowedPiError. The callsite still passed the old Pi agent dir, which no longer contains any transcript, so the helper found nothing and the generic "no output" fallback won.Changes
findSwallowedPiErrornow takes the run cwd and derives the transcript location frompiSessionWorkspaceDir, the same shared helperconfigurePiSessionWorkspaceuses to point Pi at it, so the reader and the writer can never construct the path independently again.Before: on a provider failure the user saw
After: the user sees the real error, for example
Tests / notes
pnpm testinservices/runner: all pass.pnpm run typecheck: clean.sandbox-agent-pi-error.test.tsnow write transcripts throughpiSessionWorkspaceDirtoo (flat layout, as Pi does with an explicit session dir), so they pin the shared-helper contract rather than a hand-built path.services/runner/**(the pre-commit prettier hook is scoped toweb/), so this istsc+ tests only.https://claude.ai/code/session_01Hyn9365BLPXDmNZShrQkmH