Skip to content

fix(cli): release a claim the CLI can't keep - #791

Open
vercel[bot] wants to merge 1 commit into
mainfrom
fix/release-unkept-claim
Open

vercel[bot] wants to merge 1 commit into
mainfrom
fix/release-unkept-claim

Conversation

@vercel

@vercel vercel Bot commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

From an agent's vercel feedback report: tasks claim <id> --as <profile> --json exited 1 with unexpected_error ("Failed to claim task"), yet the board kept the claim, so the retry got task_claimed and tasks complete got claim_not_held, locking the agent out of its own task until the lease ended.

The board's claim succeeds, then the CLI can't write the claim's file (~/.config/board/claims not writable, as in a sandboxed agent), so the token is lost. Now the CLI releases that claim and fails with claim_not_kept, saying why and where claims are kept; the same profile can claim again once the directory is writable.

  • Users: tasks claim, tasks run, and tasks create --claim fail with claim_not_kept (task released) instead of unexpected_error (task stuck claimed) when the claim can't be kept locally.
  • Protocol / backends: none
  • Performance / I/O: one extra release call, only on that failure.
  • Tests: cli-tasks-claims.test.ts runs the CLI as a subprocess against an in-process board with the claims directory replaced by a file: claim and create --claim fail with claim_not_kept, the task is ready, and the same profile then claims and completes it. Fails without the fix (reproduces the report). client.test.ts and slack-files.test.ts fail the same way on main in my environment.

tasks claim, tasks run, and tasks create --claim took the claim on the board, then failed to write its file, and exited unexpected_error with the task held for no one until its lease ended. They now release it and fail with claim_not_kept.
@vercel

vercel Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor Author

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
vboard-preview-publisher Ready Ready Preview Nov 21, 2026 5:17pm UTC

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants