Where does the bug appear (feature/product)?
Cursor SDK
Describe the Bug
I am on the Ultra plan and trying to use the agent.get_usage() method in 1.0.36 python sdk as documented at Cursor Python SDK | Cursor Documentation. But it throws a feature_unavailable exception:
InternalServerError: internal: [feature_unavailable] This feature is not available for your account
Status code=500
This is the same result on every retry. I also tried with agent id set to agent-<uuid>, so this is not the bare-UUID invalid_argument error. I have tried with different models and API keys.
The installed SDK sends that call to GET /v1/agents/{agentId}/usage. The Python docs for agent.get_usage() say a local agent returns a per-turn breakdown, and that cost stays None until billing settles. This call never returns a body. run.usage is the live token count and is present. get_usage() is the billed usage and dollar cost, and that is the call being rejected.
What works
- Both
run.usageandresult.usagereturn the same token counts:
TokenUsage(input_tokens=8683, output_tokens=39, cache_read_tokens=3392, cache_write_tokens=0, total_tokens=12114, reasoning_tokens=None)
Steps to Reproduce
I have tried with different models and API keys, as well as with setting the agent id
user = await client.me(api_key=“…”)
agent = await client.agents.create(model=“composer-2.5”, api_key=api_key, local=LocalAgentOptions(cwd=cwd))
run = await agent.send(prompt)
result = await run.wait()
usage = await agent.get_usage()
Expected Behavior
As documented on Cursor Python SDK | Cursor Documentation, agent.get_usage() should succeed and return the billed record for that agent. It should not raise.
Operating System
MacOS
Version Information
Python cursor-sdk version 1.0.36
For AI issues: add Request ID with privacy disabled
Request ID: 0e7899df-24de-4764-add9-f4966821657e
Does this stop you from using Cursor
Yes - Cursor is unusable