Skip to content

Agent: document partial results on credit-limit stops - #1506

Merged
rakshith48 merged 1 commit into
mainfrom
docs/agent-partial-results
Oct 2, 2026
Merged

rakshith48 merged 1 commit into
mainfrom
docs/agent-partial-results

Conversation

@rakshith48

Copy link
Copy Markdown
Contributor

Merge only after firecrawl/firecrawl#4812 is deployed. Until then the public status endpoint and SDKs don't return these fields.

Source PRs:

What changed

  • Agent guide (features/agent.mdx): new "Handling credit-limit stops" section. It explains that a run that hits maxCredits reports status: "failed" with stopReason: "credit_limit_reached". data is still only set on completed runs. The run may carry a best-effort partial, partialSchemaValid (only when a schema was sent) and message. Users should check stopReason rather than the error text, treat partial with care, and continue the thread with a follow-up to finish the work. Includes Python, Node and cURL samples, an example response, and short notes on the thread endpoint and the webhook. The failed state row and the maxCredits parameter row now point to this section.
  • API reference: GET /agent/{jobId} in v2-openapi.json gains partial, partialSchemaValid, stopReason and message. The agent.failed data entry in webhooks-openapi.json gains the same four fields.
  • Errors page, webhook events page, Node and Python SDK pages: one or two sentences each, linking to the new section.
  • No localized files touched.

The docs say these fields "may be present". Credit-limit recovery is behind a server flag that starts off, so not every credit stop returns a partial.

Checks

  • scripts/check-extraction-hostile-markdown.sh passes.
  • scripts/check-locale-api-literals.sh has the same 15 findings as main, so this PR adds none. A JSON code example for the webhook was left out on purpose, because it would have added findings to every localized webhooks/events.mdx until the next translation sync.
  • Both OpenAPI files pass swagger-cli validate.

🤖 Generated with Claude Code

Document the stopReason, partial, partialSchemaValid and message fields that
failed Agent runs may carry when they hit maxCredits, on the status endpoint,
thread runs and the agent.failed webhook. Add a "Handling credit-limit stops"
section with Python, Node and cURL samples that check stopReason, use the
partial with care, and continue the thread to finish the work.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mintlify

mintlify Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
firecrawl 🟢 Ready View Preview Oct 2, 2026, 2:19 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@rakshith48
rakshith48 marked this pull request as ready for review October 2, 2026 14:44
@rakshith48
rakshith48 merged commit 3e750ab into main Oct 2, 2026
2 of 3 checks passed
@rakshith48
rakshith48 deleted the docs/agent-partial-results branch October 2, 2026 15:37

This branch was successfully deployed

1 active deployment
staging — acb3062b Deployed Oct 2, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant