Repository navigation
Conversation
…rogress plugin (#302 architecture) Add a second native tool, agent_control, to .opencode/plugins/agent-progress.ts: list / interrupt / delete / wait / confirm_stopped. interrupt stops a RUNNING session without deleting it (ctx.session.interrupt); delete drives `opencode session delete` (session + child sessions); wait is a BOUNDED ctx.session.wait; confirm_stopped re-reads the transcript and ASSERTS no new turns (the CONFIRM-it-stopped rule). interrupt/delete/wait REQUIRE an explicit session id (never `all`) and report what was stopped, so a session another slug owns is never silently killed. Pure TypeScript: the control half's ONE execFile drives the opencode CLI (a tool, like `gh` in coord.ts), never a .sh — no marketplace pin. Also: the gate gains static + unit control coverage (closed action set, the explicit-session rail, a real read-only SQLite fixture, refusals) and the live layer now calls BOTH agent_progress and agent_control list (read-only — the test never interrupts/deletes a real session); charly.yml runs the gate in verify; instructions.md documents both tools; AGENTS.md gains the dispatcher row.
The live snippet now normalizes the tool return (a plain content string in Code
Mode, or { content }) so the model-call assertions read the real report.
…ew round 1)
- Delete CONFIRM_WINDOW_S (zero references; its comment described a window the
confirmStopped implementation does not have — an R1 comment/code divergence).
- KNOWN_TOOLS was zero-reference: wire it via unknownTools(), which the report now
uses to surface any tool outside the known set ('tools+' line); the gate asserts it.
- Move the delete children query into CONTROL_SQL (named SQL, R4).
Review — BLOCKHead SHA: Change class: opencode harness config — code/config ( Blocks
Comment thread: 0 comments — nothing to disposition. Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
Review — BLOCKHead SHA: Change class: opencode harness config — code/config ( Blocks
Comment disposition
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
…ete dead code (review round 2)
R3 — extract ONE shared helper `collectAnalyses(db, {now, windowMin, sinceMin, limit, signal})`
plus `VERDICT_RANK`/`sortByVerdict`/`resolveLimit`/`resolveSinceMin` and route BOTH
`agent_progress` (all) and `agent_control` (list) through them; drop the duplicated
`CONTROL_SQL.turns` and reuse `SQL.counts` in `turnStats` (ONE counts query).
R1 — honour the schema-advertised `all` input via `resolveTarget` (`all:true` forces the
whole set; `all:false` REQUIRES an explicit `session`).
B14(a)/R5 — delete the zero-caller `SQL.lastEvent` and the unused `stale` local in
`classify()`.
R10 check-coverage — the gate now asserts resolveTarget honours `all`, the limit/sinceMin
clamps, collectAnalyses enumerates the real store and stops on abort, and sortByVerdict
orders loudest-first.
…ete dead code (review round 2) Byte-identical to opencharly/opencharly#313: R3 (ONE collectAnalyses + ONE SQL.counts, no CONTROL_SQL.turns), R1 (`all` honoured via resolveTarget), and the dead-code removal (SQL.lastEvent, the unused `stale` local). Gate coverage added.
Review — BLOCKHead SHA: Change class: opencode harness config — code/config ( Security screen: PASS (no injection, no secret/egress, no guardrail weakening; the added plugin reads the store read-only and refuses wildcard control actions). Blocks
Comment dispositions
Non-blocking noteThe body parks the Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
|
BLOCKS Blocked scope → blocking ref → unblock.
I am NOT taking this over. This is a dependency wait, not a takeover. Protocol I am following (B2b), stated so it is auditable:
Request: reply Agent: |
Review — BLOCKHead SHA: Change class: opencode harness config — code/config ( Security screen: PASS (no injection, no secret/egress, no guardrail weakening; the added plugin reads the store read-only and refuses wildcard control actions). Blocks
Comment dispositions
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
…verging comments, gate `wait`+`confirm_stopped` (review round 4)
R1 — the report printed `artifact merged · gh pr merge …` while the verdict said
`no artifact` (the display used `a.artifacts`, the verdict `a.recentArtifacts`). A RECENT
artifact in a stale session is now COMPLETION evidence → DONE ("landed an artifact … then
quiet"), and when only OLDER artifacts exist the display labels them
"(none recent — transcript history)" — display and verdict can no longer contradict.
R1 — the `reportStatus` doc-comment claimed BOTH classifier and report call it; only
`classify` does. Comment corrected to match the code.
R1 — the analyzeSession artifacts fallback comment claimed a short-session rationale; the
fallback is unconditional (and it is LONG/truncated tails that hit it). Comment corrected.
B12 — Layer B now drives `runControl({action:"wait"})` through a stubbed ctx.session.wait
for BOTH the idle and the bounded-timeout result (and the missing-primitive refusal), plus
the `confirm_stopped` ACTION (STOPPED and STILL RUNNING vs the baseline) — a path with no
test fails to exist. Gate: 113 unit / 121 live, 0 FAIL.
…verging comments, gate `wait`+`confirm_stopped` (review round 4) Byte-identical to opencharly/opencharly#313: R1 (display/verdict artifact reconciliation + two corrected doc comments) and B12 (Layer B drives the `wait` and `confirm_stopped` control paths). Gate: 113 unit / 121 live, 0 FAIL.
Review — BLOCKHead SHA: Change class: opencode harness config — code/config ( Security screen: PASS (read-only SQLite handle, no secret/egress, no new deps, no guardrail weakening; Blocks
Comment dispositions
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
Auto-closed: 5 unanswered BLOCK/INCONCLUSIVE verdictsThis PR has received 5 non-PASS validator verdicts — Why: re-running the validator against the same unfixed head only adds another verdict and grows this PR's comment thread, which is what drives the reviewer into a runaway. The loop is bounded here instead. What to do: open a NEW pull request from a fresh branch. Fix every finding from any This is a policy action, not a code finding — the validator verdict on this run stands. |
|
RESOLVED — superseded by #320 This PR auto-closed at the 5-verdict block threshold ( Every finding from every BLOCK verdict on this thread is fixed in ONE commit on the successor:
This closed thread is no longer acted on. Follow the successor. Agent: |
…rogress plugin (supersedes #313) (#320) * feat(opencode)!: agent_control — full subagent control on the agent-progress plugin (#302 architecture) Add a second native tool, agent_control, to .opencode/plugins/agent-progress.ts: list / interrupt / delete / wait / confirm_stopped. interrupt stops a RUNNING session without deleting it (ctx.session.interrupt); delete drives `opencode session delete` (session + child sessions); wait is a BOUNDED ctx.session.wait; confirm_stopped re-reads the transcript and ASSERTS no new turns (the CONFIRM-it-stopped rule). interrupt/delete/wait REQUIRE an explicit session id (never `all`) and report what was stopped, so a session another slug owns is never silently killed. Pure TypeScript: the control half's ONE execFile drives the opencode CLI (a tool, like `gh` in coord.ts), never a .sh — no marketplace pin. Also: the gate gains static + unit control coverage (closed action set, the explicit-session rail, a real read-only SQLite fixture, refusals) and the live layer now calls BOTH agent_progress and agent_control list (read-only — the test never interrupts/deletes a real session); charly.yml runs the gate in verify; instructions.md documents both tools; AGENTS.md gains the dispatcher row. * test(opencode): live layer unwraps the Code Mode return (content string) The live snippet now normalizes the tool return (a plain content string in Code Mode, or { content }) so the model-call assertions read the real report. * fix(opencode): remove dead control constants + wire KNOWN_TOOLS (review round 1) - Delete CONFIRM_WINDOW_S (zero references; its comment described a window the confirmStopped implementation does not have — an R1 comment/code divergence). - KNOWN_TOOLS was zero-reference: wire it via unknownTools(), which the report now uses to surface any tool outside the known set ('tools+' line); the gate asserts it. - Move the delete children query into CONTROL_SQL (named SQL, R4). * fix(opencode): one shared collector + counts query, honour `all`, delete dead code (review round 2) R3 — extract ONE shared helper `collectAnalyses(db, {now, windowMin, sinceMin, limit, signal})` plus `VERDICT_RANK`/`sortByVerdict`/`resolveLimit`/`resolveSinceMin` and route BOTH `agent_progress` (all) and `agent_control` (list) through them; drop the duplicated `CONTROL_SQL.turns` and reuse `SQL.counts` in `turnStats` (ONE counts query). R1 — honour the schema-advertised `all` input via `resolveTarget` (`all:true` forces the whole set; `all:false` REQUIRES an explicit `session`). B14(a)/R5 — delete the zero-caller `SQL.lastEvent` and the unused `stale` local in `classify()`. R10 check-coverage — the gate now asserts resolveTarget honours `all`, the limit/sinceMin clamps, collectAnalyses enumerates the real store and stops on abort, and sortByVerdict orders loudest-first. * fix(opencode): reconcile the artifact display/verdict, correct two diverging comments, gate `wait`+`confirm_stopped` (review round 4) R1 — the report printed `artifact merged · gh pr merge …` while the verdict said `no artifact` (the display used `a.artifacts`, the verdict `a.recentArtifacts`). A RECENT artifact in a stale session is now COMPLETION evidence → DONE ("landed an artifact … then quiet"), and when only OLDER artifacts exist the display labels them "(none recent — transcript history)" — display and verdict can no longer contradict. R1 — the `reportStatus` doc-comment claimed BOTH classifier and report call it; only `classify` does. Comment corrected to match the code. R1 — the analyzeSession artifacts fallback comment claimed a short-session rationale; the fallback is unconditional (and it is LONG/truncated tails that hit it). Comment corrected. B12 — Layer B now drives `runControl({action:"wait"})` through a stubbed ctx.session.wait for BOTH the idle and the bounded-timeout result (and the missing-primitive refusal), plus the `confirm_stopped` ACTION (STOPPED and STILL RUNNING vs the baseline) — a path with no test fails to exist. Gate: 113 unit / 121 live, 0 FAIL. * fix(opencode): pin the artifact-completion DONE arm + document it; prove the verify step runs (review round 5) B12 — the round-4 `recentArtifact → DONE` arm shipped untested (every artifact fixture also had finish=stop, so DONE came from reportStatus regardless). Added the discriminating fixture: stale + RECENT artifact + NO finish=stop ⇒ DONE, using the REAL store tool-input shape so the artifact is truly extracted. Verified it FAILS without the arm (2 assertions). R1 — the DONE definition in .opencode/instructions.md and the agent_progress tool description now documents the artifact-completion case (a landed artifact with the session then quiet), matching classify. R10/B6 — the added verify step is proven through the charly task verify path it is wired into: `[pass] check — the agent-progress monitor+control plugin … exit=0`. Gate: 116 unit / 124 live, 0 FAIL.
…e-identical to opencharly/opencharly#320) (#153) * feat(opencode)!: agent monitor + control plugin (agent_progress + agent_control) Byte-identical to opencharly/opencharly: .opencode/plugins/agent-progress.ts (agent_progress monitor + agent_control control), scripts/check-agent-progress.mjs (A static / B unit incl. the RCA regression / C live), and the instructions.md section documenting both tools. Pure TypeScript — no .sh, no marketplace pin. * fix(opencode): remove dead control constants + wire KNOWN_TOOLS (review round 1) Byte-identical to opencharly/opencharly: delete CONFIRM_WINDOW_S (zero refs), wire KNOWN_TOOLS via unknownTools(), move the delete children query into CONTROL_SQL. * fix(opencode): one shared collector + counts query, honour `all`, delete dead code (review round 2) Byte-identical to opencharly/opencharly#313: R3 (ONE collectAnalyses + ONE SQL.counts, no CONTROL_SQL.turns), R1 (`all` honoured via resolveTarget), and the dead-code removal (SQL.lastEvent, the unused `stale` local). Gate coverage added. * fix(opencode): reconcile the artifact display/verdict, correct two diverging comments, gate `wait`+`confirm_stopped` (review round 4) Byte-identical to opencharly/opencharly#313: R1 (display/verdict artifact reconciliation + two corrected doc comments) and B12 (Layer B drives the `wait` and `confirm_stopped` control paths). Gate: 113 unit / 121 live, 0 FAIL. * fix(opencode): pin the artifact-completion DONE arm + document it; prove the verify step runs (review round 5) Byte-identical to opencharly/opencharly (successor to #313): B12 (the artifact-completion DONE arm is now pinned by a discriminating fixture), R1 (the DONE definition documents the artifact-completion case), and the charly task verify path proof. Gate: 116 unit / 124 live. --------- Co-authored-by: Andreas Trawoeger <[email protected]>
Summary
Add full subagent CONTROL to the OpenCode agent-monitor plugin, and land the
monitor + control surface + its docs + the skill. Builds directly on the operator
directive in #302 (OpenCode plugins are pure TypeScript — no
.sh, nomarketplace-pin dependency)..opencode/plugins/agent-progress.tsnow registers TWO native V2 tools:agent_progress(MONITOR, read-only) — per session: turns, span, last-activityage, tool mix, the LAST action (text/reasoning snippet + last tool + input), artifact
hints (
owner/repo#N,gh pr merge,merged,v…tags,pushed), and a verdictWORKING / IDLE / LOOP / DONE. A "message" is an ASSISTANT TURN, never a stall
signal — a high turn count is NOT a stall. It reads the opencode store
(
~/.local/share/opencode/opencode.db) read-only (bun:sqlite{readonly:true},node:sqlite{readOnly:true}).agent_control(CONTROL — the new part):list/interrupt/delete/wait/
confirm_stopped.interrupt— stop a RUNNING session WITHOUT deleting it:ctx.session.interrupt({ sessionID, continue: false })→{interrupted:true}+the turn baseline.
delete—opencode session delete <id>(the session AND its child sessions);counts/lists the children it covered; a non-zero exit is reported FAILED (never a
believed delete that did not happen).
wait— BOUNDED (DEFAULT_WAIT_TIMEOUT_S = 600)ctx.session.wait({ sessionID }).confirm_stopped— re-reads the transcript and ASSERTS no new turns; pass thebaselineTurnstheinterruptreturned — a new turn ⇒ STILL RUNNING.interrupt/delete/wait/confirm_stoppedrequire an EXPLICITsession id (
requireExplicitSessionrefusesall/blank/non-ses_) and report whatthey stopped — so a session another slug owns is never silently killed.
listisread-only.
Pure TypeScript. The control half's ONE
execFiledrives the opencode CLI (atool, exactly like
ghincoord.ts) — never a.sh, so there is nomarketplacepin. No
spawnSync/Bun.spawn/.shanywhere.Also in the umbrella:
scripts/check-agent-progress.mjs— the 3-layer gate, extended with controlcoverage. (A) static; (B) unit (the classifier incl. the RCA regression, the
control actions against a REAL read-only SQLite fixture, every refusal path, and — round
4 —
wait/confirm_stoppeddispatch); (C)LIVE_OPENCODE=1drives the REAL binary.charly.yml—verifyruns the gate..opencode/instructions.md— documents BOTH tools (monitor + control).AGENTS.md— the Skill Dispatcher row (monitor/stop a subagent →agents).layer-charly-internalschore(sync): third wave — docs revert + parallel defaults #66) and the byte-identical dotgithub copy(
.githubchore: sync gitlinks #151) land as their own repo PRs.Review rounds — every block fixed in ONE commit on this head
Round 1's code findings (
CONFIRM_WINDOW_Sdeleted;KNOWN_TOOLSwired) were in3ce13af; rounds 2–3 fixed the R3/R1/dead-code blocks. This head (a4e9bed, plus theupdate-branchmerge) fixes every round-4 block in ONE commit:wait(andconfirm_stopped) shipped with no test. Layer B now drivesrunControl({action:"wait"})through a stubbedctx.session.waitfor BOTH the idleresult and the bounded-timeout result (plus the missing-primitive refusal), and the
confirm_stoppedACTION (STOPPED and STILL RUNNING vs the baseline) — a path with notest now fails to exist.
reportStatusdoc-comment diverged from the code. It claimed BOTH theclassifier and the report call it; only
classifydoes. Comment corrected to match thecode (the ONE source of the terminal state, called by
classify).self-contradicted. The comment claimed a short-session rationale; the fallback is
unconditional (and it is LONG/truncated tails that hit it) — corrected. The consequence
was real: the report printed
artifact merged · gh pr merge …beside ano artifactverdict (display used
a.artifacts, verdict useda.recentArtifacts). Fixed: aRECENT artifact in a stale session is now COMPLETION evidence →
DONE("landed anartifact (…) then quiet 42m > 15m"), and when only OLDER artifacts exist the display
labels them
(none recent — transcript history). Display and verdict can no longercontradict; the gate asserts both.
(a
27m/IDLEheader with a6m/WORKINGverdict from an earlier run). How testednow pastes the COMPLETE output of ONE invocation, each session self-consistent.
Assisted-by:line is the body's FINAL line.(Also carried from round 2: R3 — ONE
collectAnalysesloop + ONEsortByVerdict+ONE
SQL.countsquery shared by both branches,CONTROL_SQL.turnsdeleted; R1 —resolveTargethonours the schema-advertisedall; B14(a)/R5 —SQL.lastEventandthe unused
stalelocal deleted.)How tested
All commands executed on the new head
e447df5(this branch, post-update-branch).The gate — Layer A (static) + Layer B (unit), on this head:
The round-4 coverage (new assertions):
The R3/R1 shared-helper coverage (round 2):
Layer C — the REAL opencode binary (v2.0.19), live-or-skip, on this head:
121 PASS / 0 FAIL / 0 SKIP with the live layer on this head.
A REAL
agent_progressrun against the live store — the COMPLETE output of ONEinvocation (each session self-consistent; note
session_v2.modelis stored JSON, hencemodelrenders the bare id viaparseModel):A REAL
agent_controllistrun — the COMPLETE output of ONE invocation, from theSAME store moments later:
The sibling opencode gates still PASS on this head:
R3/R5 dead-code self-test:
grep -c 'SQL.lastEvent\|const stale '→0; the onlyCOUNT(*) AS turns … MAX(time_created)occurrence isSQL.countsitself (used by bothanalyzeOneandturnStats).A note on
charly task verify(known, owned blocker — issue #306). The umbrella rootcharly.ymlcarries noversion:stamp (dropped by 803d411), so the local charlyloader refuses the project before any step runs — this reproduces on unmodified
origin/main, is the open issue #306, and is unrelated to thischange:
The per-file gate scripts above ARE the opencode/verify steps this PR adds and are the
sanctioned verification for them. CI (pinned charly) runs the required workflow.
Rulebook compliance
git-workflow,plugin,agents,skills,marketplace,strict-policy.setup(ctx)(ctx.session.interrupt/waitexist;ctx.session.list/deletedoNOT). The inert-
alldivergence is honoured; the two diverging doc-comments arecorrected; the artifact display/verdict contradiction is FIXED (not documented). All
gates green, no warnings.
one surfaced blocker (
charly task verifycannot load) is not parked — it is theopen, separately-owned umbrella charly.yml cannot load: version stamp dropped by 803d411 but the loader requires it #306 with the exact command pasted.
collectAnalysesloop + ONEsortByVerdict+resolveLimit/resolveSinceMin+ ONESQL.countsquery, shared by BOTH toolbranches;
CONTROL_SQL.turnsdeleted. OneexecFilehelper drives the CLI.CONTROL_ACTIONS,DEFAULT_WAIT_TIMEOUT_S,DEFAULT_LIMIT,DEFAULT_SINCE_MIN,VERDICT_RANK,SQL,CONTROL_SQL;waitis bounded; no sleeps/retries/magic numbers.CONFIRM_WINDOW_S,SQL.lastEvent, and the unusedstalelocal are gone in this same tree.layer ran against the real binary and the real store.
store, a REAL
/bin/falsefor the failing-CLI case); Layer C drives the REAL opencodebinary and SKIPS visibly on the stochastic model-call.
e447df5; theupdate-branchwas folded in before the re-run.feat/agent-progressworktree/branchand PR docs(agents)!: subagent lifecycle — instruct, use, monitor (artifact+cadence, no counter) #308 were not touched; this is an independent branch.
Change classification
.opencode/*,scripts/check-*.mjs,charly.yml,AGENTS.md) — code/config, not docs-only.scripts/check-agent-progress.mjs(A/B/C — 113 unit, 121 withthe live layer, on this head), plus the sibling opencode gates;
charly task verifyisblocked by open umbrella charly.yml cannot load: version stamp dropped by 803d411 but the loader requires it #306.
(
agent_progress+agent_control list) ran live against the real opencode binary andthe real store, with the output retained above; the full
charly task verifygate didnot pass (blocked by umbrella charly.yml cannot load: version stamp dropped by 803d411 but the loader requires it #306).
Relates to #302 (the pure-TypeScript architecture directive). Skill
source lands in
opencharly/layer-charly-internals#66 (projection consumer legopencharly/marketplace#380); the byte-identical dotgithub copy lands inopencharly/.github#151.Agent:
agent-monitor-control· sessionses_f13e97f62ffebD0x2sHlT4KW19Assisted-by: OpenCode DeepSeek V4.1 Flash (analysed on a live system)