Skip to content

Linear writeback: can't reorganize existing issues (assign project, add labels, set state); projects/labels not writable or resolvable #200

Description

@khaliqgant

Summary

Reorganizing existing Linear issues via file-native writeback isn't possible today. You can create and delete issues, but you can't assign an existing issue to a project, add/change its labels, or move its state through the mount writeback surface — and projects/labels aren't synced as resolvable/writable resources at all. This blocks programmatic Linear cleanup/organization.

Surfaced while bulk-organizing the AR team (162 issues → delete ~74 test/canary, label + group the ~88 real ones).

What works today

  • create_issue — incl. projectId (UUID) and labels: [{name}] (label auto-created/resolved by name). Verified live.
  • delete_issue / file_delete on an issue path.
  • Read/ingest side already fully models linear.project_*, linear.labels, milestones, teams (packages/linear/src/linear-adapter.ts).

The hole

  1. Projects are not a writable resource. The Linear writeback contract (discovery/linear/.adapter.md) exposes only issues and comments. There is no way to:
    • create a Linear project via writeback (no projectCreate), or
    • assign an existing issue to a project (the only project path is projectId at issue-create time; AR-275 added create-with-project, but not assign-on-update).
  2. update_issue can't reorganize. No file-native path to, on an existing issue: add/replace labels (add_issue_labels), set project, or change state (e.g. move Backlog → Canceled in bulk). update_issue/issueUpdate exists in the cloud provider but these fields aren't plumbed through the adapter writeback surface.
  3. Projects & labels aren't synced as resolvable resources. The mount mirrors only /linear/issues and /linear/teams — no /linear/projects or /linear/labels. So existing project/label IDs can't be discovered for assignment, and there's no by-name resolution catalog. (Create-with-label works only because label-by-name auto-creates server-side.)

Net: file-native writeback supports create + delete issues, but not reorganize them — which is exactly what bulk cleanup needs.

Proposed

  • Add projects (and ideally labels) as first-class Linear writeback resources: create + assign, resolvable by name or id.
  • Extend update_issue to set project (by name/id), labels (add/replace, by name), and state (by name/id) on existing issues.
  • Sync /linear/projects and /linear/labels into the mount so ids are discoverable and assignments can be validated (round-trip-safe paths, like teams).
  • Bulk-friendly: allow these via update_issue writebacks so an agent can reorganize N issues without the Linear API.

Impact

Without this, any "organize the Linear backlog" task must fall back to the Linear GraphQL API (personal API key) — the file-native/relayfile path can't do it. Concretely it blocked the AR-team reorg described above (could delete the test issues, but not project/label/group the real ones).

Refs

  • Cloud writeback provider (executes mutations): cloud/packages/relayfile/src/writeback/providers/linear.ts (issueCreate/issueUpdate/issueDelete/commentCreate/agentActivityCreate).
  • Adapter (ingest + path-mapper, models projects/labels on read): packages/linear/src/linear-adapter.ts.
  • Prior: AR-275 "relayfile-adapters: add Linear project writeback (create…)" added create-with-project; this issue is the assign/update/resolve follow-on.

Found 2026-06-16 during Linear backlog cleanup via writebacks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions