Skip to content

Commit 161d1fa

Browse files
committed
docs(adr): ADR-017 — record the Agents-API Preview spike findings (UX.24)
Time-boxed no-infra spike against the deployed app-actor token: - API reachable: agentActivityCreate, agentSessionCreateOnIssue, AgentSession type, AgentActivityType enum all present + match docs. - agentActivityCreate accepts our {agentSessionId, content:{type:thought, body}} input (failed only on session-id lookup, not schema) — ack-emission half proven callable. - BLOCKER (config, not code): agentSessionCreateOnIssue → 'Agent sessions are not enabled for this application'. App needs the 'Agent session events' webhook category enabled in Linear Application settings (app-owner action). - 10s-ack-vs-long-compute risk not yet proven E2E (needs a real session id, gated on enablement) — but its components are confirmed callable. Throwaway issue created + deleted; app token scrubbed. No migration code.
1 parent 58da79a commit 161d1fa

2 files changed

Lines changed: 66 additions & 0 deletions

File tree

docs/decisions/ADR-017-linear-agent-session-interaction.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,39 @@ mapping cleanly onto what we already built:
6969
| "reply with guidance" retry (UX.9) | `elicitation` + `prompted` webhook + conversation history |
7070
| panel header state (🔄/✅/⚠️) | session state (active/complete/error) |
7171

72+
### Preview-API spike (2026-06-17, UX.24)
73+
74+
A time-boxed, no-infra spike validated the API surface against the deployed
75+
**app-actor** token (`bgagent`, workspace `maguireb`) — read-only schema
76+
probes + mutation input validation, no migration code:
77+
78+
- **API reachable by our token.** Introspection confirms `agentActivityCreate`,
79+
`agentSessionCreateOnIssue`/`OnComment`/`Create`, `AgentSession` (fields incl.
80+
`status`, `issue`, `comment`, `appUser`), and `AgentActivityType` =
81+
`thought, action, response, elicitation, error, prompt` — exactly the docs.
82+
- **Activity input shape verified callable.** `agentActivityCreate(input:
83+
{agentSessionId, content: JSONObject, signal, ephemeral})` accepts our
84+
`{type:'thought', body}` content — a call failed only on session-id lookup,
85+
not schema/enablement, so the ack-emission half of the loop is proven.
86+
- **BLOCKER (config, not code):** `agentSessionCreateOnIssue` returns
87+
`"Agent sessions are not enabled for this application."` The bgagent OAuth
88+
app has the scopes + `actor=app` but has **not been enabled as an agent** in
89+
its Linear Application settings. Per docs, enabling = edit the app at
90+
*Settings → API → Applications*, enable webhooks, and select the **"Agent
91+
session events"** category. App-owner action; no waitlist mentioned.
92+
- **The 10s-ack-vs-long-compute risk is therefore NOT yet proven end-to-end**
93+
it needs a real `agentSessionId`, which is gated on the enablement toggle
94+
above. The pieces it depends on (immediate `thought` ack, then later
95+
`action`/`response` activities) are individually confirmed callable; the
96+
remaining unknown is purely whether Linear marks the session unresponsive if
97+
our spawn exceeds 10s after the initial `thought` (docs say the `thought`
98+
ack within 10s is sufficient, which our processor can emit synchronously
99+
before the async spawn — same shape as today's 👀).
100+
101+
Net: the spike de-risked reachability + the activity model and pinpointed the
102+
single enablement step, without committing to migration. Re-run the
103+
session-create + timed-activity sequence once the app is enabled.
104+
72105
### Why a channel, not a rewrite
73106

74107
- The win is **real but partial**: agent sessions retire the brittle

docs/src/content/docs/decisions/Adr-017-linear-agent-session-interaction.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,39 @@ mapping cleanly onto what we already built:
7373
| "reply with guidance" retry (UX.9) | `elicitation` + `prompted` webhook + conversation history |
7474
| panel header state (🔄/✅/⚠️) | session state (active/complete/error) |
7575

76+
### Preview-API spike (2026-06-17, UX.24)
77+
78+
A time-boxed, no-infra spike validated the API surface against the deployed
79+
**app-actor** token (`bgagent`, workspace `maguireb`) — read-only schema
80+
probes + mutation input validation, no migration code:
81+
82+
- **API reachable by our token.** Introspection confirms `agentActivityCreate`,
83+
`agentSessionCreateOnIssue`/`OnComment`/`Create`, `AgentSession` (fields incl.
84+
`status`, `issue`, `comment`, `appUser`), and `AgentActivityType` =
85+
`thought, action, response, elicitation, error, prompt` — exactly the docs.
86+
- **Activity input shape verified callable.** `agentActivityCreate(input:
87+
{agentSessionId, content: JSONObject, signal, ephemeral})` accepts our
88+
`{type:'thought', body}` content — a call failed only on session-id lookup,
89+
not schema/enablement, so the ack-emission half of the loop is proven.
90+
- **BLOCKER (config, not code):** `agentSessionCreateOnIssue` returns
91+
`"Agent sessions are not enabled for this application."` The bgagent OAuth
92+
app has the scopes + `actor=app` but has **not been enabled as an agent** in
93+
its Linear Application settings. Per docs, enabling = edit the app at
94+
*Settings → API → Applications*, enable webhooks, and select the **"Agent
95+
session events"** category. App-owner action; no waitlist mentioned.
96+
- **The 10s-ack-vs-long-compute risk is therefore NOT yet proven end-to-end**
97+
it needs a real `agentSessionId`, which is gated on the enablement toggle
98+
above. The pieces it depends on (immediate `thought` ack, then later
99+
`action`/`response` activities) are individually confirmed callable; the
100+
remaining unknown is purely whether Linear marks the session unresponsive if
101+
our spawn exceeds 10s after the initial `thought` (docs say the `thought`
102+
ack within 10s is sufficient, which our processor can emit synchronously
103+
before the async spawn — same shape as today's 👀).
104+
105+
Net: the spike de-risked reachability + the activity model and pinpointed the
106+
single enablement step, without committing to migration. Re-run the
107+
session-create + timed-activity sequence once the app is enabled.
108+
76109
### Why a channel, not a rewrite
77110

78111
- The win is **real but partial**: agent sessions retire the brittle

0 commit comments

Comments
 (0)