Skip to content

fix(projects): an explicit --project UUID must name a live project - #75

Merged
muqsitnawaz merged 2 commits into
mainfrom
fix/strict-project-uuid
Oct 17, 2026
Merged

muqsitnawaz merged 2 commits into
mainfrom
fix/strict-project-uuid

Conversation

@muqsitnawaz

Copy link
Copy Markdown
Contributor

Why

resolve_project_id let any 36-character UUID through unchecked, so a stale id in an agents projects definition read as "no issues". agi-ui's recorded Linear id (2a56fa44-…) no longer exists in the workspace, yet linear tasks --project 2a56fa44-… --json printed "count": 0 with exit 0. The AGI EXT Project panel would show an empty Issues tab instead of an error.

What

  • Strict resolution (every explicit --project) now checks a UUID against list_team_projects. This is the same membership check resolve_auto_project_id already does for the cwd binding. A miss raises LookupError, which every strict caller already turns into Error: … and exit 1.
  • Non-strict callers keep the pass-through and make no extra API call.
  • CHANGELOG entry under Unreleased.

Run

Run against the real workspace on yosemite-s0, from this branch. Log: yosemite-s0:/home/muqsit/.local/share/agents/artifacts/2026-10-16/project-linear-simplify/runs/linear-strict-uuid.log

$ linear tasks --project 2a56fa44-adc9-45be-acb5-1d20ad07afcb --json   # agi-ui's stale id
Error: project 2a56fa44-adc9-45be-acb5-1d20ad07afcb is not a live project on this team.
rc=1

$ linear tasks --project 8eb8f5b1-3870-4590-ba67-36f3811d1435 --json | head -8   # AGI, live
{
  "scope": "all",
  "cycle": null,
  "project": {
    "id": "8eb8f5b1-3870-4590-ba67-36f3811d1435",
    "name": "8eb8f5b1-3870-4590-ba67-36f3811d1435",
    "auto": false
  },

$ python3 -m unittest test_linear
Ran 283 tests in 3.223s
OK (skipped=4)

This is part of routing the Project panel's Linear reads through agents projects tickets in agents-cli. It is independent of #74.

🤖 Generated with Claude Code

A UUID-shaped --project passed straight through, so a project id recorded
before the project was deleted or moved listed as an empty project. Strict
resolution now checks the id against the team's live projects, the same
membership check the cwd auto-scope already makes, and fails like an unknown
name. Non-strict callers are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
list_team_projects returns [] when the API call fails, so a rate limit made a
valid --project UUID read as deleted. An empty list now says the check could
not be made. The stale-id message names archived projects too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@muqsitnawaz

Copy link
Copy Markdown
Contributor Author

Independent review by a non-author code-reviewer subagent. Verdict: APPROVED (non-blocking findings addressed).

  • Every strict resolve_project_id caller handles LookupError. python3 -m unittest test_linear: 283 OK.
  • Fixed in 0fbc352: an unreadable (empty) project list no longer reports a valid id as stale, and the message names archived projects.
  • Re-run: 284 OK. A live stale id exits 1 with the message; the live AGI id lists.

@muqsitnawaz
muqsitnawaz merged commit 58c24e2 into main Oct 17, 2026
5 checks passed
@muqsitnawaz
muqsitnawaz deleted the fix/strict-project-uuid branch October 17, 2026 05:33
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.

1 participant