fix(agent-pool): include issue state in claim queue JSON

isAutonomousClaimable requires state === OPEN; omitting it from gh
--json made every ready issue look not-open and zeroed the pool queue.

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
This commit is contained in:
Cursor Agent 2026-08-01 03:20:27 +00:00
parent 08c38f5724
commit d93a0c361f
No known key found for this signature in database
2 changed files with 4 additions and 2 deletions

View file

@ -38,8 +38,9 @@ const openReady = ghJson([
'ready',
'--limit',
'200',
// Include `state` for parity with the pool queue (isAutonomousClaimable).
'--json',
'number,title,body,labels,createdAt',
'number,title,body,labels,createdAt,state',
])
// Queue builder lives in agent-github.mjs (shared with the agent pool —

View file

@ -105,8 +105,9 @@ const loadClaimQueue = () =>
'ready',
'--limit',
'200',
// `state` is required: isAutonomousClaimable rejects missing/non-OPEN as not-open.
'--json',
'number,title,body,labels,createdAt',
'number,title,body,labels,createdAt,state',
]),
issuesById(),
)