Commit graph

1806 commits

Author SHA1 Message Date
Kit Langton
f23941d789 test(core): use Effect.andThen in session wait mock 2026-11-05 01:59:06 -08:00
Kit Langton
114189e274 feat(core): page Session.wait back through history for an answer 2026-11-05 01:59:06 -08:00
Kit Langton
9b2833ba31 feat(core): make Session.spawn safe to retry with a caller-chosen id 2026-11-05 01:59:06 -08:00
Kit Langton
f2b0727cad feat(core): return outcome and text from Session.wait 2026-11-05 01:59:05 -08:00
Kit Langton
e6aef1ea04 feat(core): add Session.spawn for subagent children 2026-11-05 01:59:05 -08:00
Kit Langton
f429081c10 fix(core): wait for a running background child on a foreground continuation
A foreground follow-up that continues a child whose job is already
backgrounded joined it through jobs.block, which returns a running handle
immediately. Claim the backgrounded generation instead: silence the
subagent.notify preference before the prompt is admitted, wait on the
job's done with jobs.wait, and return the final answer inline. A prompt
that never reaches the child releases the claim so the original launch
still reports.

A joined backgrounded job holds no block registration, so the user's
move-to-background cannot detach this explicit foreground wait.
2026-11-05 01:59:01 -08:00
Kit Langton
973548ed37 feat(core): default the subagent tool to background
Foreground becomes background plus a wait: an explicit background=false
starts the same job and blocks on it, returning the child result inline.
The tool description and docs now lead with background.
2026-11-05 01:59:01 -08:00
Kit Langton
4d5cb17bbb fix(core): return foreground subagent answers without waiting for background work 2026-11-05 01:57:58 -08:00
Kit Langton
a1558e90ca Merge dev into pool-subagents 2026-11-05 01:14:45 -08:00
Kit Langton
611fb8ae75 fix(core): give subsequent subagent reports distinct identities 2026-11-05 01:14:21 -08:00
Kit Langton
11d91d4e1a test(core): reproduce dropped immediate subagent re-prompt reports 2026-11-05 01:14:21 -08:00
Kit Langton
b910054418 fix(core): share recovered subagent settlement lifecycle 2026-11-05 01:14:21 -08:00
Kit Langton
e406fd65a5 fix(core): preserve held report ownership for live foreground jobs 2026-11-05 01:14:21 -08:00
Kit Langton
23eb65cc19 fix(core): recover durable held subagent reports after restart 2026-11-05 01:14:21 -08:00
Kit Langton
2be3290eb5 test(core): cover interruption during held report delivery 2026-11-05 01:14:21 -08:00
Kit Langton
8846c1a2a4 fix(core): persist held subagent report ownership 2026-11-05 01:14:21 -08:00
Kit Langton
d181372b35 feat(core): durable held subagent report storage 2026-11-05 01:14:21 -08:00
Kit Langton
893e8dc43f
fix(core): honor an MCP server's startup timeout when waiting for it (#62019) 2026-11-05 00:57:45 -08:00
Kit Langton
7e42be4248
fix(core): follow Console redirects for skills and web search (#62015) 2026-11-05 00:57:37 -08:00
Luke Parker
dd39237ddf
fix(plugin-browser): drive browser attachments through one state machine (#61985) 2026-11-05 00:56:59 -06:00
Luke Parker
b6cfbec4cc
fix(core): find Microsoft Store PowerShell 7 on Windows (#61952) 2026-11-04 23:51:41 -06:00
Kit Langton
749bb0fa93 fix(core): bound a subagent report to its own busy period
Each busy period records where it began, on the clock that stamps event times, plus the child's newest answer at that moment. Settlement only reports an answer that completed during the period, excluding the starting answer by ID for millisecond ties and falling back to the timestamp alone when a committed revert deleted that row.
2026-11-04 20:39:10 -08:00
Kit Langton
3a385d63bf fix(core): tie subagent report ownership to the busy period's job generation 2026-11-04 20:39:10 -08:00
Kit Langton
5696f8e37e test(core): pin silent subagent resume-exhaustion replay
A silent child whose resume budget is exhausted must clear its durable
marker without reporting an error to the parent.
2026-11-04 20:39:10 -08:00
Kit Langton
b35b8d532f test(core): cover silent subagent restart replay
Restart recovery already clears a silent child's durable marker without
delivering a report. Pin that invariant: a suspended silent child resumed
after a restart never reports or wakes its parent, and replaying a silent
child's finished durable row admits nothing while still clearing the marker.
2026-11-04 20:39:10 -08:00
Kit Langton
1b090664a1 fix(core): release the nearest held ancestor through a silent subagent chain 2026-11-04 20:39:10 -08:00
Kit Langton
d6f276d5b8 fix(core): hold subagent report until child background work finishes 2026-11-04 20:39:10 -08:00
Kit Langton
5cea753106 test(core): cover held subagent reports released after background work 2026-11-04 20:39:09 -08:00
Kit Langton
298f89c5cb fix(core): retain pending notices and failed subagent outcomes 2026-11-04 20:39:09 -08:00
Kit Langton
bd18108c9b fix(core): hold a subagent's report until its background work finishes 2026-11-04 20:39:09 -08:00
Kit Langton
aff43234c8
feat(core): a switch that turns every feature flag on (#61826) 2026-11-04 19:13:30 -08:00
Kit Langton
20c94b79f1
fix(core): keep retrying while the provider's host is unreachable (#61880) 2026-11-04 19:08:19 -08:00
Kit Langton
66b25c2bfc
feat(core): one registry for feature flags, on by default in dev builds (#61825) 2026-11-04 18:52:38 -08:00
Aiden Cline
64ca766ff7
fix(core): fall back to legacy for stdio MCP servers that ignore the version probe (#61817) 2026-11-04 17:56:11 -06:00
Aiden Cline
33d52e6011
feat(core): share MCP connections across locations with pool: true (#61185) 2026-11-04 17:43:08 -06:00
Filip
a0c6df8fde
fix(core): start background compaction a fixed lead before the threshold (#60049) 2026-11-05 00:28:39 +01:00
Kit Langton
9e51de2b0e fix(core): stop restart from reporting a resumed subagent twice 2026-11-04 15:05:44 -08:00
Kit Langton
d92f54232a test(core): cover the foreground subagent staying silent at settlement 2026-11-04 14:46:33 -08:00
Kit Langton
e5eb2f39a1 feat(core): report a settled subagent child to its parent from core
A child Session with a parent now sends one `<subagent ...>` synthetic to its
parent when its coordinator busy period settles, without the subagent tool
observing it.

- `SubagentReport` snapshots job state (blocked, get, recovery, remembered
  period) inside `settled` before the terminal publish, then maps the outcome
  to completed/error/cancelled and admits through a local inbox adapter that
  mirrors `Session.synthetic` (steer delivery, wake only a live, non-reverting
  parent). `execution.ts` gains `SessionInbox.node`; `Session.Service` stays out
  of the execution layer.
- Reports are keyed to the job's notification ID when a backgrounded live job
  owns the period, so the SubagentJob observer and restart recovery reconcile
  the same admission instead of adding a second message. A jobless period gets
  a fresh ID; a period whose job finished or was cancelled mid-flight stays
  silent because its observer already reported it.
- Suppressed for shutdown interruption (restart owns it), a missing child or
  parent, a silent child, a foreground block, a running job without a
  notification ID, and a period that finished without an assistant message.
- `SubagentCompletion.deliver` now takes a structural synthetic adapter, so the
  settle report does not need `Session.Service`. The report never calls
  `completeBackground`: the durable marker must outlive admission.
- `Job.Interface` gains a `recovery` reader; `Job.Info` deliberately keeps it
  out so snapshots cannot leak it.

The replay test in `tool-subagent.test.ts` now asserts the marker exists at
admission instead of being `completed`, because settlement admits while the job
is still running; it replays a completed row to model the crash it covers.
2026-11-04 14:44:58 -08:00
Aiden Cline
9a3f03e5c5
refactor(ai): flatten generation knobs on requests and defaults (#60971) 2026-11-04 16:31:11 -06:00
Kit Langton
6000b7c51b
perf(core): write each assistant part as its own row instead of rewriting the message (#58916) 2026-11-04 14:16:44 -08:00
Filip
88cc1e71af
fix(core): finish MCP connect and disconnect when the caller is interrupted (#61806) 2026-11-04 23:09:45 +01:00
Kit Langton
6cb8aba19a feat(core): thread a subagent notify preference and job foreground visibility 2026-11-04 14:07:28 -08:00
yangguan-xue
e0300a9bfc
fix(core): stop repeated zsh q flags from freezing the shell scanner (#60791)
Co-authored-by: yangguan-xue <184704694+yangguan-xue@users.noreply.github.com>
Co-authored-by: Daniel Smolsky <dannysmo@gmail.com>
2026-11-04 21:46:18 +00:00
Filip
b92e085cf8
feat(app): accept a pasted redirect URL for MCP sign-in (#61706)
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2026-11-04 19:06:05 +01:00
Aiden Cline
125655ec6f
fix(core): reject URL credentials and ignore fragments in web permissions (#61701) 2026-11-04 10:36:04 -06:00
Aiden Cline
d10c993904
fix(core): normalize and validate tool input schemas at registration (#61537) 2026-11-04 10:01:19 -06:00
Adam
b3fd4a75fe
feat(core): refresh Console config before prompts and add a console.poll server option (#61583) 2026-11-04 04:29:54 -06:00
Adam
ce53f18a1b
feat(server): let embedders supply the fetch for OpenCode's HTTP and MCP requests (#61582) 2026-11-04 04:13:45 -06:00
Adam
baeebc2f93
feat(core): add a websearch.use policy action (#61557) 2026-11-04 04:13:25 -06:00