fix(cli): opencode run drops a Stop hook's continuation
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 70/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- node.js, typescript
- Área
- cli, developer-experience
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 481
- Forks
- 45
- Merge medio
- 1 d 13 h
- PR fusionados (30 d)
- 91
Preparar el entorno
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de ai-driven-dev/framework
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
ai-driven-dev/framework#1311 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
ai-driven-dev/framework#1244 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
ai-driven-dev/framework#1197 ·
Los mantenedores suelen responder en 1 día
-
refactor(aidd-context): apply the new skill template to learnPosiblemente ocupada @blafourcade la tomó hace 3 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
ai-driven-dev/framework#1186 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
ai-driven-dev/framework#1163 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de ai-driven-dev/framework
Issues similares
-
db-d1-sqlite: upsert is aliased to updateOne, so payload.kv.set never inserts new keysPosiblemente ocupada @pcbeingused333 la tomó hoy. AbiertoBug db: d1-sqlite Payload OSS
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
payloadcms/payload#19766 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
device-management-toolkit/sample-web-ui#3711 ·
Los mantenedores suelen responder en 1 día
-
bug impact:low Team: SecuritySolution Team:Defend Workflows v9.6.0
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
elastic/kibana#306401 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
agentes-chat/agentes-chat#927 ·
Los mantenedores suelen responder en 1 día
-
Closing a pinned tab jumps to the Tabs section instead of the next open pinned tabPosiblemente ocupada @seenimohamed la tomó hoy. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
ardia-browser/ardia#2769 ·
Los mantenedores suelen responder en 1 día