Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
155 commits
Select commit Hold shift + click to select a range
7511aea
feat(plugin): add opencode v2 port with event-driven architecture
valentimarco Aug 25, 2026
5e04ade
feat(plugin): show visible notification when recovering from stall/fa…
valentimarco Aug 26, 2026
ad92b39
feat(v2): target stable @opencode/plugin 2.0.5 API
valentimarco Sep 17, 2026
aa89252
docs(v2): add install guide and stable migration notes
valentimarco Sep 17, 2026
b5fd8aa
docs(v2): document @opencode/plugin resolution requirement
valentimarco Sep 17, 2026
5491286
Merge remote-tracking branch 'upstream/master' into pr20-v2port
famewolf Sep 24, 2026
0a0a961
OOC lock (parity with v1 loop-fix)
Sep 26, 2026
9a44699
v2: never interrupt compaction or live busy sessions
famewolf Sep 27, 2026
0dd0403
fix(v2): never nudge a turn that hands off to the user
famewolf Sep 27, 2026
3c1d88c
v2 back-port: shouldStandDownForUser guard (v1 parity) - stand down o…
famewolf Sep 28, 2026
875d7e4
fix(v2): stop self-inflicted "Step interrupted" and synthetic-continu…
Sep 28, 2026
67c34ff
fix(v2): stand down when a question or permission is awaiting the user
famewolf Sep 29, 2026
4855d18
fix(v2): handle the session.revert.* family so a rewind drops watch s…
famewolf Sep 30, 2026
7135c46
feat(v2): read every v1 option, warn on unknown keys, and complete bu…
famewolf Oct 1, 2026
c871c29
feat(v2): sweep sessions on startup, and give the plugin a log file a…
famewolf Oct 1, 2026
e61dfec
feat(v2): catch the premature stop, and make activeUserWindowMs real
famewolf Oct 1, 2026
f93dfa1
feat(v2): read the token window and route saturated sessions like v1 …
famewolf Oct 1, 2026
d301bd2
feat(v2): catch the stream that finished without saying anything
famewolf Oct 1, 2026
887ae94
feat(v2): ask for the tool call when the model writes one in its reas…
famewolf Oct 1, 2026
16fdc92
feat(v2): read the todo list, and stop trusting the emoji on its own
famewolf Oct 1, 2026
7d7c8c3
feat(v2): offer the model an explicit way to say it is finished
famewolf Oct 1, 2026
516c40f
feat(v2): name a replacement when a model calls a tool that does not …
famewolf Oct 1, 2026
3c15386
feat(v2): recover a parent left waiting on a subagent that will not a…
famewolf Oct 1, 2026
537b2d3
feat(v2): judge a finished turn once its text has settled, not the in…
famewolf Oct 1, 2026
d890f6c
Merge upstream/master into the v2 port
famewolf Oct 1, 2026
263a8e8
docs(v2): the install guide was describing a plugin this is not
famewolf Oct 1, 2026
805aca4
Drop the session.reverted case: v1 never emitted it
famewolf Oct 1, 2026
a83e158
fix(v2): read todos from the session message log, not the dead storag…
famewolf Oct 3, 2026
801e22e
docs: correct why the storage fallback cannot be promoted
Oct 3, 2026
a355db3
docs: say why the todo parser is a copy and not an import
Oct 3, 2026
5f3fb0a
docs: sync todo storage section to namespaced reality, 780 count
famewolf Oct 3, 2026
ef25e39
test: gate back-to-back idles on observed nudge, not 10ms hope
famewolf Oct 3, 2026
f773ea6
docs: recommend opencode-todo-fork as the confirmed todo plugin
famewolf Oct 3, 2026
2052c07
v2: cross-instance duplicate check via session log
famewolf Oct 5, 2026
7fb1b9f
v2: one live instance per process, and a per-session inject mutex
famewolf Oct 5, 2026
4ccbf80
v2: put the singleton on globalThis — module scope cannot see re-eval…
famewolf Oct 5, 2026
8a34aa5
v2: thinking/tool-call turns are alive — dead-stream detector no long…
famewolf Oct 5, 2026
7fdc472
v2: own prompts don't re-arm budgets; bash->shell alias before fuzzy …
famewolf Oct 5, 2026
333a4e1
v2: quota failures stand down on a gate ladder instead of retrying in…
famewolf Oct 5, 2026
0fef903
v2: own-prompt re-arm exclusion survives null-body projections via in…
famewolf Oct 5, 2026
05838f7
v2: re-arm keeps examined parts — stale errors never re-suggest
famewolf Oct 5, 2026
c36c560
v2: skip busy-stall recovery while a parent waits on live subagents
famewolf Oct 5, 2026
a38d681
test: drop the module-scope assertion superseded by the globalThis re…
famewolf Oct 5, 2026
67437d8
v2: visible stall continue + rich prod text + duplicate anti-repeat
famewolf Oct 5, 2026
90113a7
v2: AUTO_RESUME_VISIBLE_CONTINUE env fallback + startup line reports …
famewolf Oct 5, 2026
3df2339
v2: visibleContinue defaults true (config options dropped by parser)
famewolf Oct 5, 2026
0497165
test: stand-down CONTROL follows visible-default channel
famewolf Oct 5, 2026
a9f2425
test: keep test sessions out of the LIVE auto-resume log
famewolf Oct 5, 2026
963a9fd
docs: dead-stream tool-call exception, plugins-vs-plugin delivery
famewolf Oct 5, 2026
e89bd0b
docs: v1 backport research (rich text, dup guard, startup log, silent…
famewolf Oct 5, 2026
27add46
docs: refresh v2 suite figures and feature list in migration.md
famewolf Oct 5, 2026
7cc0714
v2: inert configProbe option — proves plugins[].options delivery with…
famewolf Oct 5, 2026
3c7ce7f
v2: busy-stall stands down while a turn waits on the user
famewolf Oct 5, 2026
43246e6
v2: subagent protection without ctx.client + cancel stall timers on d…
famewolf Oct 6, 2026
0c07d32
v2: verify delivery before fallback sends (no twin prods)
famewolf Oct 6, 2026
5f85adb
v2: quiet subagents wait inside a patience window; orphan aborts term…
famewolf Oct 6, 2026
511d64d
test: parent-wait CONTROL drops the child link entirely
famewolf Oct 6, 2026
22d8f28
v2: dead instances send nothing (liveness checks on every send path)
famewolf Oct 6, 2026
4eeaed8
v2: genuine user message re-arms after user interrupt (timestamp-gated)
famewolf Oct 7, 2026
a929581
v2: explicit stop statements latch completion; stall respects the latch
famewolf Oct 7, 2026
a6281b2
v2: bound recovery sends so wedged transports cannot stack twins
famewolf Oct 7, 2026
a1ab24c
v2: silent tool completions defeat the exact-duplicate skip
famewolf Oct 7, 2026
c480fa5
v2: model progress between stalls restarts the attempt ladder
famewolf Oct 8, 2026
7bf1329
v2: permanent-failure latch stops continues into a dead model
famewolf Oct 9, 2026
cdf9bee
v2: gate the whole permanent-failure class from opencode's own taxonomy
famewolf Oct 9, 2026
aefec42
v2: enforce the locks at the injection choke point, not two of five p…
famewolf Oct 9, 2026
cb57a4a
v2: reload forensics, and the closest available bash->shell fix
famewolf Oct 9, 2026
c353d5d
test: attempt-reset writes to its own log file
famewolf Oct 9, 2026
985702d
fix: two mod= stamps were not stamping anything
famewolf Oct 9, 2026
e8e3df8
fix: the shell alias hint grew by one copy per reload
famewolf Oct 9, 2026
24f77fc
fix: shell alias dedupe must be process-wide, not module-scope
famewolf Oct 9, 2026
8a8c224
v2: drop the shell-alias annotation — it changed nothing
famewolf Oct 9, 2026
7f1e672
v2: indeterminate failures get one retry, not a first-occurrence gate
famewolf Oct 9, 2026
f79af79
v2: provider.unknown is indeterminate, not permanent
famewolf Oct 9, 2026
7463d09
v2: the stall ladder never climbed, and the stall text had no time
famewolf Oct 9, 2026
203b178
v2: centralize lock guards; fix review findings
famewolf Oct 9, 2026
6062ee2
v2: nudge turns parked on a tool result that never arrives
famewolf Oct 9, 2026
c92a9ad
v2: stuck-tool age gate 60s, not the stall window
famewolf Oct 9, 2026
f84c052
v2: retry trailing tool errors; ladder resets on text only
famewolf Oct 9, 2026
4ddac7c
v2: unknown-tool suggestion goes synthetic, not visible
famewolf Oct 9, 2026
aa6a947
v2: never retry policy-blocked tool calls
famewolf Oct 9, 2026
b74137a
v2: watchdog reads server truth when the active surface is missing
famewolf Oct 9, 2026
24e85dc
v2: state each stall fact once in the continue text
famewolf Oct 9, 2026
b7c4f03
v2: quietCorrections option; silence order rides in the text
famewolf Oct 9, 2026
b94b5d6
v2: failure stalls carry no idle field
famewolf Oct 9, 2026
5cf5aed
v2: failure loops stand down instead of cycling forever
famewolf Oct 9, 2026
532c351
v2: ladder resets only on observable new episodes, never on transitions
famewolf Oct 9, 2026
ba6207d
v2: stall ladder restarts on silence+success progress; 503 slot-busy …
famewolf Oct 9, 2026
4c2fbf0
v2: nudge reasoning-only turns that produced nothing
famewolf Oct 9, 2026
af99fde
v2: latch bare TASK COMPLETE like a stop statement
famewolf Oct 10, 2026
5527471
v2: share watch state across setups behind shareWatchState flag
famewolf Oct 10, 2026
964a5cd
v2: latch bare TASK COMPLETE; recheck idle stand-down at window expiry
famewolf Oct 10, 2026
9861ef8
v2: cover prod-shaped (role) history in latch and recheck tests
famewolf Oct 10, 2026
3d9282c
v2: offer hand-off on busy path; scoped stall text; local timestamps
famewolf Oct 10, 2026
bf1a491
v2: back off refire fuse across one episode (endless 1/3 fix)
famewolf Oct 10, 2026
3e32862
v2: read flat-text history shapes (prod transcripts carry text, not p…
famewolf Oct 10, 2026
d61ca62
v2: log every ladder reset (kill silent branches)
famewolf Oct 10, 2026
ea48be6
v2: pull 503 slot-busy ladder; 503s are generic failures (SelfRef #5)
famewolf Oct 10, 2026
10e589d
v2: visible quota notices (arm + exhausted), resume:false
famewolf Oct 10, 2026
e9b257c
v2: read history roles through shared accessors (prod sends role, not…
famewolf Oct 11, 2026
b059ad9
v2: persist the quota ladder to storage, not the log file
famewolf Oct 11, 2026
0d8c098
test: fix the two causes of suite flakiness under parallel load
famewolf Oct 11, 2026
c6ceb0f
v2: extract shared serveQuotaRung for quota cooldown serving
famewolf Oct 11, 2026
eda3522
v2: clear gaveUp only on observable new episodes, never in markBusy
famewolf Oct 11, 2026
a142c00
test: fix the two load-flaky tests at their root causes
famewolf Oct 11, 2026
21eaa07
test: replace fixed sleeps with condition polls in two more flaky tests
famewolf Oct 11, 2026
4c664b9
test: bound each fuse rung against its own nominal, not the previous gap
famewolf Oct 11, 2026
8730116
test: size poll budgets for the parallel suite, not for isolation
famewolf Oct 11, 2026
f4fdc3a
fix(v2): stop the process-global registry from silencing other instances
famewolf Oct 11, 2026
bdb6f58
fix(v2): a stale server listing must defer the dead-stream recovery, …
famewolf Oct 11, 2026
408ffec
feat(v2): one instant nudge for turns that end with nothing delivered
famewolf Oct 11, 2026
cab79d6
feat(v2): busy stall defers while young tools run; compress never int…
famewolf Oct 11, 2026
ce6f7e1
fix(v2): watchdog re-checks stuck tools; stop vocabulary covers real …
famewolf Oct 11, 2026
3b8cecc
fix(v2): orphan watch yields to a fresh user message; one dead child,…
famewolf Oct 11, 2026
50f5001
test(v2): behavioural coverage for the stall watchdog's shell guard
famewolf Oct 11, 2026
1d0b214
fix(v2): every synthetic continue carries the no-destructive / no-new…
famewolf Oct 11, 2026
3484d16
test(v2): annotate guardrail-wire test callback (fixes tsc implicit-any)
famewolf Oct 11, 2026
000e567
fix(v2): stall ladder defers on unfinished work in history, not just …
famewolf Oct 11, 2026
7866b7d
fix(v2): latch completion claims before activity stand-down; clear la…
famewolf Oct 11, 2026
a08b674
stall: send the stuck prompt when a stall parks on a wedged tool
Oct 11, 2026
0ec74ef
fix(v2): scope the stop-statement connective guard to the final clause
famewolf Oct 11, 2026
f255fbd
revert(v2): remove stall→stuck delegation that false-positives on liv…
famewolf Oct 11, 2026
82354a9
fix(v2): shells get their own stall-path young TTL (10 min)
famewolf Oct 12, 2026
604b26f
test(v2): give the quota-drop poll room under full-suite load
famewolf Oct 12, 2026
17135a8
chore(v2): log session.idle event data keys (turn-identity probe)
famewolf Oct 12, 2026
5193461
fix(v2): park a scheduled recovery when the user speaks mid-backoff
famewolf Oct 12, 2026
2637ff2
fix(v2): clamp genuine-user timestamps to the present at ingestion
famewolf Oct 12, 2026
184607b
feat(v2): stall text carries the episode retry number
famewolf Oct 12, 2026
313fa36
fix(v2): user-takeover park uses >= so same-sweep messages count
famewolf Oct 12, 2026
4fca944
fix(v2): retry number counts recoveries, not progress restarts
famewolf Oct 12, 2026
d63440c
feat(v2): retry count restarts on genuine turns, ladder untouched
famewolf Oct 12, 2026
99a8ab4
fix(v2): migrate watches adopted from older builds; never throw on mi…
famewolf Oct 13, 2026
8e42951
docs: add Todo list nudges section (upstream todolist link, nudge exa…
famewolf Oct 13, 2026
001c642
fix(v2): celebration emoji latches anywhere in the tail, not just tra…
famewolf Oct 13, 2026
bf7b341
fix(v2): celebration latch is last-line only, not anywhere-in-tail
famewolf Oct 13, 2026
1d0f7b5
docs: accuracy pass — version marks, v2 architecture, completion docs
famewolf Oct 13, 2026
07cc2c8
docs: ship a bare-bones AGENTS snippet with the plugin
famewolf Oct 13, 2026
7746cc0
fix(v2): token flow resets the stall clock only when usage grows
famewolf Oct 13, 2026
b099abf
fix(v2): strip trailing @N@ boundary markers before completion tests
famewolf Oct 13, 2026
5d7560c
chore: bump to 1.2.0 for v2-port release (Mte90 #45)
famewolf Oct 13, 2026
f3b8ae9
docs: move Installation to top of README
famewolf Oct 14, 2026
75ea298
fix(v2): throttle phrasing never latches OOC (upstream issue #46)
famewolf Oct 15, 2026
4b633ea
feat(v2): lifetime cap on stall continues (lifetimeMaxContinues, defa…
famewolf Oct 15, 2026
bc7d71f
docs: harden AGENTS snippet completion rule (exact bytes, v2 note, why)
famewolf Oct 15, 2026
5b349b0
feat(v2): standby/ready completion stops + done-claim consolidation +…
famewolf Oct 15, 2026
66b7ffe
docs: compat floor, updating, uninstall (no release bundle yet)
famewolf Oct 15, 2026
1667832
merge upstream master (stopPatterns #43, revert-watch #40, package 1.…
famewolf Oct 15, 2026
b27cda5
test(v2): derace the silent-tool re-arm test
famewolf Oct 15, 2026
618ca42
docs: confirmed todo pairing is upstream opencode-todolist (fork reti…
famewolf Oct 15, 2026
f98eb28
fix(v2): add waiting-for-user-input stop states to STOP_STATEMENT_PAT…
famewolf Oct 17, 2026
6419444
fix(v2): broaden STOP_STATEMENT_PATTERNS with completion/blocked voca…
famewolf Oct 17, 2026
a0b51d9
feat(v2): efficiency pass + bounded stall-ladder restarts
famewolf Oct 17, 2026
7394c79
Revert "feat(v2): efficiency pass + bounded stall-ladder restarts"
famewolf Oct 17, 2026
cf1a395
auto-resume: do not skip stall detection when subagent parentID is un…
famewolf Oct 18, 2026
1bc7652
v2: consume a stall rung only when the continue prompt is delivered
famewolf Oct 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ node_modules/
dist/
.DS_Store
*.log

# v2 build output (bun build src/v2/index.ts --outdir dist-v2 --target bun)
dist-v2/
444 changes: 354 additions & 90 deletions README.md

Large diffs are not rendered by default.

46 changes: 46 additions & 0 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions docs/AGENTS-snippet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!-- Bare-bones operator instructions for sessions watched by auto-resume.
Copy into your AGENTS.md (project root, or ~/.config/opencode/AGENTS.md
for global effect), or hand pieces to models that lack them. Every
capability below is conditional on existing — a bare setup degrades to
the text fallback rather than misfiring. -->

## Task completion

A) When all requested work is finished: if todo tools are available, mark
every todo complete first — unfinished items will block the completion
signal and you'll be asked to continue them instead. Then call the
`task_complete` tool if one exists; otherwise end your reply with TASK
COMPLETE on its own last line (a trailing 🎉 is also accepted). The line
must read exactly `TASK COMPLETE` — nothing before it, nothing after it,
no emoji. (Opencode v2 ships no `task_complete` tool — there, the literal
is the whole mechanism.) Call it once — repeated completion calls mean
something is still open, so go do that instead. Do not end with a question
unless you actually need the user. Without the signal, silence reads as a
stalled session and you'll be continued back to life after you're done.

## Todos (only if you use a todo plugin)

If todo tools are available, keep the list current as you work — mark items
complete when done, not at the end. Recovery tooling reads the live list; a
stale list gets you reminded about finished work.

## Questions

End with a question only when you actually need the user. An unanswered
question reads as still-working to anything watching the session.
Loading
Loading