Skip to content

Add backfill command and clarify LINEAR_API_KEY requirement#6

Merged
github-actions[bot] merged 1 commit into
mainfrom
backfill-and-docs
May 27, 2026
Merged

Add backfill command and clarify LINEAR_API_KEY requirement#6
github-actions[bot] merged 1 commit into
mainfrom
backfill-and-docs

Conversation

@riddim-developer-bot
Copy link
Copy Markdown
Contributor

Summary

  • npx linear-agent-hooks backfill — new command that replays provenance comments for sessions where the stop hook couldn't post (most common cause: LINEAR_API_KEY not set in environment when Claude launched)
  • Per-session .done files track which Linear issues have already received comments, making both stop.mjs and backfill idempotent at the issue level — safe to run multiple times
  • README now explains why a direct API key is needed (stop hook runs after the session ends, no MCP connection is available), that it's the same key the Linear MCP server uses, and that it must live in the shell profile before launching Claude or Codex

Test plan

  • CI passes (35 tests)
  • 3 new stop.mjs tests: backfill hint in no-key warning, .done file written after run, done-set skip skips already-commented issues

- Add `npx linear-agent-hooks backfill` to post missing provenance
  comments for sessions where the stop hook couldn't run (e.g. key
  not set at Claude launch time)
- Add per-session `.done` files to track which Linear issues have
  already received comments — makes stop.mjs and backfill idempotent
  at the issue level
- Update stop.mjs: write/read done set, surface backfill hint in the
  no-key warning
- Update README: explain why LINEAR_API_KEY is needed (stop hook runs
  after session ends, no MCP available), that it's the same key as the
  Linear MCP server, and that it must be in the shell profile before
  launching Claude/Codex
- Add 3 new stop.mjs tests (backfill hint, done file written, done-set
  skip) — total 35 tests
@github-actions github-actions Bot enabled auto-merge (squash) May 27, 2026 23:06
@github-actions github-actions Bot merged commit 2bcbdac into main May 27, 2026
2 checks passed
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