fix(cli): opencode run drops a Stop hook's continuation
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 70/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- node.js, typescript
- Bereich
- cli, developer-experience
Rechercherichtung
Start with opencode-hooks-bridge.ts and the shipped opencode-events.js asset, then trace how the Stop hook handles session.idle and calls client.session.promptAsync(...). Reproduce with opencode run using the issue’s described setup and compare with opencode serve plus opencode run --attach. Done when a blocking Stop hook continues the turn once under non-interactive opencode run.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Description
Under opencode run (non-interactive), a Stop hook's continuation never reaches the session. The bridge generated into .opencode/plugin/<plugin>-hooks.js runs the Stop script on session.idle, reads its {"decision":"block","reason"}, then calls client.session.promptAsync(...) without awaiting it. opencode run exits once the session is idle, so the prompt is lost.
Affected file(s)
The OpenCode and Kilo hooks bridge generator (opencode-hooks-bridge.ts and the opencode-events.js asset it ships).
Expected behaviour
A Stop script that blocks continues the turn once, under opencode run as under opencode serve or the TUI.
Observed behaviour
opencode run: the session ends on the model's last message;opencode export <session>shows no follow-up message.opencode serveplusopencode run --attach: the follow-up arrives (the reason is the next user message).- The Stop script itself answers correctly: run by hand with a Stop payload,
memory.cjs hookprints the block.
Repro: a project with aidd-context translated flat for opencode, a committed aidd_docs/memory/vcs.md, then opencode run "remove one line of aidd_docs/memory/vcs.md with your edit tool".
AI tool
OpenCode (Kilo shares the bridge, not tested)
Additional context
Only the non-interactive mode is affected: scripts and CI. Fix candidates: await the prompt before the handler returns, or keep the run alive until a pending continuation is sent.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 481
- Forks
- 45
- Ø Merge
- 1 T. 13 Std.
- Gemergte PRs (30 T.)
- 91
Entwicklungsumgebung
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus ai-driven-dev/framework
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
ai-driven-dev/framework#1311 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 79/100
ai-driven-dev/framework#1244 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
ai-driven-dev/framework#1197 ·
Maintainer antworten meist innerhalb von 1 Tag
-
refactor(aidd-context): apply the new skill template to learnEvtl. vergeben @blafourcade hat das vor 3 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
ai-driven-dev/framework#1186 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
ai-driven-dev/framework#1163 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in ai-driven-dev/framework
Ähnliche Issues
-
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 87/100
Maintainer antworten meist innerhalb von 1 Tag
-
🛠️ dette technique
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 61/100
betagouv/mon-entreprise#4752 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 5 Tagen
-
type: bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 67/100
franciscoBSalgueiro/en-croissant#1111 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
area/providers type/feature version/v2
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
anomalyco/opencode#64845 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag