firecrawl agent silent stdout failure when --max-credits insufficient is a dangerous category bug for agentic consumers
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- typescript
- Ambito
- cli
Direzione di ricerca
Non è indicato alcun file sorgente né alcun test. Inizia eseguendo la riproduzione fornita di firecrawl agent e traccia come vengono gestiti i fallimenti dovuti al raggiungimento del limite massimo di crediti tra stderr, stdout e lo stato di uscita del processo. Il lavoro è completo quando il contratto di errore selezionato è esplicito e la riproduzione non appare più come un risultato vuoto riuscito.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary (the category)
firecrawl agent exhibits a dangerous failure mode for agentic consumers: when --max-credits is insufficient to complete the query, the command returns 0 bytes on stdout while writing the failure message only to stderr. This is the canonical "silent corruption" pattern that breaks downstream pipelines.
This issue is about the failure-mode category, not the specific credit threshold.
Repro
firecrawl-cli==1.18.0, macOS 25.5.0, paid account (51K+ credits available):
$ firecrawl agent "How does Andrej Karpathy use Obsidian for note-taking?" \
--model spark-1-mini --max-credits 50 --wait \
> out.txt 2> err.txt
$ wc -c out.txt err.txt
0 out.txt # <-- silent failure
~118 KB err.txt # <-- spinner spam (separate concern, see #102)
$ grep -v '^\[K[⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏]' err.txt | tail
✗ Agent failed
Error: Refusal: Error: Agent reached max credits
$ echo $? # exit code
0 # <-- ALSO 0, so `set -e` callers won't notice
Bumping --max-credits to 200 makes the same query succeed (returns ~2 KB of content).
Why this is dangerous
A downstream agentic consumer capturing stdout sees:
- Empty result (looks like "agent found nothing")
- Zero exit code (looks like success)
That consumer will proceed with empty input and produce a silent-corruption error chain. In our case (multi-vendor scatter-gather research workflow), the FireCrawl subagent silently produced no content for the synthesizer, and we only discovered the failure when comparing per-vendor file sizes against expectations.
This is a category of bug — any agentic consumer that exhausts credits at any model/query combo will hit it.
Proposed fixes (any one is sufficient)
| Option | Effort | Benefit |
|---|---|---|
| A. Exit non-zero on max-credits exhaustion | Low | set -e and shell callers detect it; doesn't change output shape |
B. Mirror the error to stdout as a JSON envelope: {"error": "max_credits_exceeded", "message": "...", "job_id": "..."} |
Medium | Agentic consumers parsing stdout JSON detect it |
C. Document a --max-credits floor per model in --help (e.g., "spark-1-mini: 200 minimum") |
Low | Doc-only; doesn't fix the silent-failure category but prevents misuse |
Option A is the cheapest + most defensive. Option B is the most consumer-friendly (especially when paired with #102's --json work). Option C is doc-only and complementary.
Related
- #102 ("Improve CLI outputs for agentic use") proposes
--quiet/--silent/--concise. A--strictmode that escalates stderr errors to non-zero exit + stdout JSON envelope would directly address this. - The spinner spam mentioned above is a separate concern; the silent-stdout-failure can be fixed independently.
Repro environment
- firecrawl-cli: 1.18.0 (installed via
npm install -g firecrawl-cli) - OS: macOS 25.5.0 (Darwin), zsh
- Auth: stored credentials (post
firecrawl login --api-key) - Account: paid plan, 51,238 credits available — so it's not a "ran out of account credits" symptom, it's strictly a
--max-creditsbudget cap - Model tested:
spark-1-mini(failed at--max-credits 50, succeeded at 200)
- Lingua principale
- TypeScript
- Stelle
- 635
- Fork
- 106
- Merge medio
- 1h 33m
- PR unite (30g)
- 43
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di firecrawl/cli
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
firecrawl-monitor skill: description exceeds Claude Code's 1024-char limit, skill fails to load Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 68/100
Tutte le issue di firecrawl/cli
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
[Bug]: Matrix progress drafts fail with "Matrix runtime not initialized" during tool activity Apertabug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
calcite-components needs triage refactor
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Esri/calcite-design-system#15203 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
danielmiessler/LifeOS#2218 ·