E405 [Bug] Get agent status endpoint never returns creditsUsed attribute until status=complete · Issue #2891 · firecrawl/firecrawl · GitHub
[go: up one dir, main page]

Skip to content

[Bug] Get agent status endpoint never returns creditsUsed attribute until status=complete #2891

@jschellerat

Description

@jschellerat

Describe the Bug
When polling the Get Agent Status endpoint (GET /v1/agent/{agentId}) while an agent job is in progress, the creditsUsed attribute is never included in the response. It only appears once the agent job reaches status=complete. This makes it impossible to track credit consumption in real time while a job is running.

To Reproduce

  1. Start an agent crawl job via POST /v1/agent
  2. Poll the agent status endpoint GET /v1/agent/{agentId} while the job is still running (status is not complete)
  3. Observe that the creditsUsed field is missing from the response body
  4. Wait for the job to complete (status=complete)
  5. Poll the status endpoint again — creditsUsed now appears in the response

Expected Behavior
The creditsUsed attribute should be returned in the Get Agent Status response at all stages of the job lifecycle (e.g. processing, running, complete), reflecting the credits consumed so far. This would allow consumers to monitor credit usage in real time rather than only after completion.

Screenshots
N/A

Environment (please complete the following information):

  • OS: macOS
  • Deployment Type: Cloud (firecrawl.dev)
  • Firecrawl Version: Latest (API)
  • Node.js Version: N/A (using REST API directly)

Logs
N/A

Additional Context
The API documentation for Get Agent Status lists creditsUsed as a response field, but it is only populated when the job is complete. It would be helpful to either update the docs to clarify this limitation, or (preferably) return the running credit total at every status check.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0