GET /api/v2/agents/states returns empty array - agent not showing as logged in

Problem
We’re trying to pull current agent states via the Python SDK for a custom dashboard script. The call keeps returning an empty list when we know the agent is logged in and actually handling queues. I’ve checked the division ID and the auth token looks valid.

Code

import gen_cloud_py
from gen_cloud_py.rest import ApiException

api_instance = gen_cloud_py.ArchitectApi(gen_cloud_py.ApiClient(config))
try:
 result = api_instance.get_agents_states(expand=['identity'], division_id='e3b1c2a4-1234-5678-9abc-def012345678')
 print(result)
except ApiException as e:
 print(f"Status: {e.status}, Reason: {e.reason}")

Output
The status comes back 200. No exceptions thrown. The payload is just []. I swapped the division ID for the root org and tried filtering by agent_ids=['user-uuid-here']. Still nothing. The agent actually has an active session in CXone right now. You can see the state change in the web UI. We’ve been using this endpoint for months without issues. Suddenly it’s blank.

Question
Is there a specific query param I’m missing? The docs show expand and divisionId, but nothing about session filtering. The SDK docs don’t mention it. Could it be a caching layer on the API side or a missing scope on the client credentials? The token definitely has admin:agent:view. I even regenerated the token just to rule out expiration. We’re passing the Bearer token through the environment variable. The script runs on a cron job. Everything else in the org works fine. Just this endpoint acts up. The SDK version is 1.8.4. Not sure where to look next.