Receive Linear Agent Session webhooks and run OpenClaw agents on issues.
When a Linear issue is delegated to your agent app, this plugin:
- Receives the webhook
- Starts an OpenClaw agent session
- Posts the agent's response back to Linear
npm install openclaw-linear-plugin- Go to Linear Settings → API → Applications
- Create a new application with:
- Name: Your agent name (e.g., "DevBot")
- Webhook URL:
https://your-gateway/plugins/openclaw-linear-plugin/linear - Enable Agent session events in webhook categories
Complete the OAuth flow with these parameters:
https://linear.app/oauth/authorize?
client_id=YOUR_CLIENT_ID&
response_type=code&
scope=read,write,app:assignable,app:mentionable&
actor=app&
redirect_uri=YOUR_REDIRECT_URI
The actor=app parameter is required for agent functionality.
The webhook URL must be publicly accessible. If using Tailscale, enable Funnel:
tailscale funnel 18789 # Replace with your gateway portAdd to your openclaw.json:
{
"plugins": {
"entries": {
"openclaw-linear-plugin": {
"enabled": true,
"config": {
"devAgentId": "dev",
"linearWebhookSecret": "lin_wh_...",
"linearApiKey": "lin_oauth_...",
"defaultDir": "/path/to/repo",
"delegateOnCreate": true,
"startOnCreate": true
}
}
}
}
}| Option | Type | Description |
|---|---|---|
devAgentId |
string | Agent ID to handle issues (default: "dev") |
linearWebhookSecret |
string | Webhook signing secret from Linear |
linearApiKey |
string | OAuth token from Linear app installation |
defaultDir |
string | Default repository directory |
repoByTeam |
object | Map team keys to repo directories |
repoByProject |
object | Map project keys to repo directories |
delegateOnCreate |
boolean | Auto-delegate issues to app (default: true) |
startOnCreate |
boolean | Move issues to "started" state (default: true) |
notifyChannel |
string | Optional: Channel for notifications (e.g., "discord") |
notifyTo |
string | Optional: Notification target (e.g., "channel:123456") |
externalUrlBase |
string | Optional: External session URL template |
externalUrlLabel |
string | Optional: Label for external URL link |
streamActivities |
boolean | Post progress activities during agent runs (default: false) |
streamToolCalls |
boolean | Post tool call activities during agent runs (default: true) |
streamIntervalMs |
number | Heartbeat interval for progress thoughts in ms (default: 120000, 0 disables) |
streamMaxChars |
number | Max chars for streamed tool args/results (default: 500) |
streamToolAllowlist |
string[] | Tool name allowlist for streaming (supports * wildcards) |
streamToolDenylist |
string[] | Tool name denylist for streaming (supports * wildcards) |
streamDebug |
boolean | Enable debug logging for streaming hooks (default: false) |
Use placeholders for dynamic URLs:
{
"externalUrlBase": "https://your-app.com/sessions/{session}",
"externalUrlLabel": "View Session"
}Supports {session} and {issue} placeholders.
Enable streaming to post tool activity updates and periodic heartbeat thoughts:
{
"streamActivities": true,
"streamToolCalls": true,
"streamIntervalMs": 120000,
"streamMaxChars": 500,
"streamToolAllowlist": ["*"],
"streamToolDenylist": ["browser", "canvas"],
"streamDebug": false
}- Webhook Reception: Linear sends an AgentSessionEvent when an issue is delegated to your app
- Initial Response: Plugin posts a "thinking" activity within 5 seconds
- Agent Execution: OpenClaw agent runs with the issue context
- Response Posting: Agent's reply is posted back to Linear as a response activity
POST /plugins/openclaw-linear-plugin/linear
Legacy path (still supported):
POST /plugins/linear/linear
The plugin verifies the Linear-Signature header when linearWebhookSecret is configured.
- Check that your webhook URL is publicly accessible
- Verify
linearApiKeyhas correct OAuth scopes - Check OpenClaw logs for errors
- Ensure
linearWebhookSecretmatches Linear's signing secret - Check for clock skew (webhooks older than 60s are rejected)
- Verify
devAgentIdmatches an agent in your OpenClaw config - Check that the agent has necessary tool permissions
{
"action": "created",
"agentSession": {
"id": "session_abc123",
"issue": {
"id": "issue_xyz789",
"identifier": "ENG-123",
"title": "Fix login bug",
"url": "https://linear.app/team/issue/ENG-123"
}
},
"promptContext": "<issue>...</issue>",
"guidance": "Follow coding standards"
}MIT © stumct