Conversation
The plain `firecrawl agent <jobId>` check printed {"success":true,"status":"failed","data":null} and exited 0 for an already-failed job, dropping the server error. Match the --wait path: exit 1 with the server's error (or "Agent failed" when none is sent). Completed, processing and cancelled statuses are unchanged. Refs firecrawl#115.
There was a problem hiding this comment.
All reported issues were addressed across 2 files
Shadow auto-approve: would auto-approve with 2 open P3 issues. Makes the non-wait agent status check exit 1 on failed jobs and surface the server error, matching the existing --wait behavior. Adds fixture-based tests covering exit codes across statuses, keeping the fix bounded and verified.
Fix all with cubic | Re-trigger cubic
There was a problem hiding this comment.
0 issues found across 2 files (changes from recent commits).
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Shadow auto-approve: would auto-approve. Fixes firecrawl agent <jobId> to exit 1 and surface the server error for failed jobs, matching the --wait path; other statuses stay unchanged and tests cover the behavior.
Re-trigger cubic
firecrawl agent <jobId>on a job that already failed printed{"success":true,"status":"failed","data":null}and exited 0, so the server's error was lost. The--waitpath already returns the failure with the error; this makes the plain status check do the same: exit 1 with the server's error, or "Agent failed" if none is sent. Completed, processing and cancelled are unchanged.This covers the remaining non-wait case of #115, it doesn't close the whole issue.
Added
agent-status.test.ts(6 cases against a local HTTP fixture). The failed-status case fails on current main.pnpm test,type-checkandformat:checkpass locally.AI help was used for this change.
Summary by cubic
Makes
firecrawl agent <jobId>exit 1 when an already-failed job is checked, matching the--waitpath so the server's error isn't lost.agent-status.test.tscovering exit codes across all statuses, empty/missing errors, and HTTP rejection cases.Written for commit 4746693. Summary will update on new commits.