Linear Agent Bridge banner
MPIsaac-Per MPIsaac-Per

Linear Agent Bridge

Development community

Description

Bridge Linear agent sessions to a local agent runtime

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

linear-agent-bridge

Run your Claude Code setup as a Linear agent. Delegate an issue to it or message it in an agent session, and a Claude Agent SDK session runs on your machine, in a working directory you choose, with everything that directory carries: CLAUDE.md instructions, MCP servers, skills. Replies land in the issue's agent-session thread.

This is a compact reference implementation (no framework, tested). It is not a coding agent; for assign-an-issue-get-a-PR flows, see [Cyrus](https://github.com/ceedaragents/cyrus). This bridge is for talking to an agent that knows your context: a knowledge base, an ops repo, a project directory.

Runs on Claude Code subscription auth. No Anthropic API key.

Architecture

Linear (mention / delegate / follow-up prompt)
  -> webhook + reconciliation: AgentSessionEvent / AgentSession activities
  -> src/server.ts        verify HMAC, persist ingress, ack < 5s
  -> src/state/store.ts   durable receipt + semantic execution claim
  -> src/queue.ts         per-session FIFO lanes, concurrent across sessions
  -> src/runtime/claude.ts  Agent SDK query(), cwd = KB_PATH, resume
  -> src/linear/client.ts   agentActivityCreate (thought/action/response)

Session mapping (Linear session id -> SDK session id), bounded webhook state, and Linear's rotating OAuth token pair persist in JSON files. Follow-up prompts resume the same conversation, webhook retries do not dispatch the same turn twice, accepted work survives a process exit before dispatch, missed prompt and stop webhooks recover through reconciliation, and access refreshes without another browser authorization.

For each valid agent event, the bridge durably persists a receipt keyed by Linear's `webhookId` and a semantic execution claim before returning 200. Created turns use `created:` as the execution identity; prompted turns use `agentActivity.id`. A claim left active by a process crash is reclaimed by a replacement process only when dispatch never st