opencode/packages
Kit Langton 2f0dd2ebc5 fix(core): bound concurrent session resumes after restart
After a server restart every suspended session and recovered subagent resumed at once (concurrency unbounded), so ~40 turns hit their first model request together and froze the host.

Resumes now go through a Semaphore (Options.maxConcurrentResumes, default 3). The permit is taken on the sweep fiber before the attempt is counted, and held until the resumed turn's first step ends or fails (session.step.ended / session.step.failed, subscribed before the turn starts), the turn ends, or 60 seconds pass. It is never released just because the resume fiber was forked.

- Shell notices first, then settled subagent results, then running subagent children through the gate, then suspended sessions most recently updated first (listSuspended now orders by time_updated desc).
- countResume and the 'Continuing after restart' synthetic run inside the slot, so queued sessions are not charged an attempt until they start. Ownership (local job, child/parent existence, active execution, claim) is re-checked at admission.
- Each session leaves the early-notice set as soon as its own resume is accounted for, so a parent that already resumed and went idle is still woken by a child result while older sessions wait in line.
- resumeSuspendedSessions completes once every resume has started rather than right away. Existing tests assert accounting as soon as it returns, and every caller already forks it.

Attempt budget and shell recovery are unchanged.
2026-10-25 05:23:11 -07:00
..
ai feat(ai): send min_p on xAI Responses (#58889) 2026-10-25 00:27:58 -05:00
app fix(app): name variant shortcut consistently (#58951) 2026-10-25 11:03:25 +00:00
cli fix(cli): accept --server and --standalone in any position (#58505) 2026-10-23 10:43:38 -07:00
client feat(core): expose MCP server title from serverInfo (#58950) 2026-10-25 11:02:29 +00:00
codemode sync release versions for v2.1.4 [skip ci] 2026-10-23 10:15:01 +00:00
console docs(go): add Iceman Contributor Free (#58792) 2026-10-24 13:24:13 -07:00
containers chore: bump Bun to 1.4.4 (#58087) 2026-10-22 21:34:15 +10:00
core fix(core): bound concurrent session resumes after restart 2026-10-25 05:23:11 -07:00
desktop sync release versions for v2.1.4 [skip ci] 2026-10-23 10:15:01 +00:00
effect-drizzle-sqlite sync release versions for v1.18.35 2026-10-06 20:18:36 +00:00
function sync release versions for v2.1.4 [skip ci] 2026-10-23 10:15:01 +00:00
gui-extensions fix(app): let a custom Close tab shortcut close terminal and browser tabs (#58945) 2026-10-25 10:47:03 +00:00
http-recorder sync release versions for v2.1.4 [skip ci] 2026-10-23 10:15:01 +00:00
httpapi-codegen sync release versions for v2.1.4 [skip ci] 2026-10-23 10:15:01 +00:00
identity
latex sync release versions for v2.1.4 [skip ci] 2026-10-23 10:15:01 +00:00
merman sync release versions for v2.1.4 [skip ci] 2026-10-23 10:15:01 +00:00
plugin refactor(ai): make Promise the root entry and move Effect to @opencode/ai/effect (#58847) 2026-10-24 22:18:23 -05:00
plugin-browser sync release versions for v2.1.4 [skip ci] 2026-10-23 10:15:01 +00:00
plugins sync release versions for v2.1.4 [skip ci] 2026-10-23 10:15:01 +00:00
posts chore: use bun check for local typechecks and TypeScript 7.1 in CI (#58253) 2026-10-23 09:23:31 +10:00
protocol feat(core): expose MCP server title from serverInfo (#58950) 2026-10-25 11:02:29 +00:00
schema feat(core): expose MCP server title from serverInfo (#58950) 2026-10-25 11:02:29 +00:00
script chore: upgrade typecheck to TypeScript 7.0.2 (#56300) 2026-10-17 13:26:46 -07:00
sdk refactor(ai): make Promise the root entry and move Effect to @opencode/ai/effect (#58847) 2026-10-24 22:18:23 -05:00
server refactor(ai): make Promise the root entry and move Effect to @opencode/ai/effect (#58847) 2026-10-24 22:18:23 -05:00
session-ui sync release versions for v2.1.4 [skip ci] 2026-10-23 10:15:01 +00:00
simulation sync release versions for v2.1.4 [skip ci] 2026-10-23 10:15:01 +00:00
stats docs(go): add Iceman Contributor Free (#58792) 2026-10-24 13:24:13 -07:00
storybook fix(app): show MCP elicitation forms in desktop and web (#58305) 2026-10-23 14:11:05 +10:00
theme sync release versions for v2.1.4 [skip ci] 2026-10-23 10:15:01 +00:00
tui fix(tui): contain plugin slots and routes that render bare text (#58144) 2026-10-24 15:24:44 -04:00
ui sync release versions for v2.1.4 [skip ci] 2026-10-23 10:15:01 +00:00
util sync release versions for v2.1.4 [skip ci] 2026-10-23 10:15:01 +00:00
web sync release versions for v2.1.4 [skip ci] 2026-10-23 10:15:01 +00:00