Skip to content

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

Closed as not planned

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.

Activity

  1. added
    bug
    on Feb 22, 2026
  2. Godkunn commented on Feb 27, 2026

    @Godkunn

    Hi team, I'd love to take a look at this. It seems like the creditsUsed variable just needs to be piped into the response payload during the running state in the agent controller. Can I get assigned to this?

  3. added a commit that references this issue on Feb 28, 2026
    8e1e2c0
  4. added 2 commits that reference this issue on Mar 12, 2026
    219d86f
    4e735d3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions