fix(cli): opencode run drops a Stop hook's continuation
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 70/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Stack de tecnologia
- node.js, typescript
- Domínio
- cli, developer-experience
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- TypeScript
- Estrelas
- 481
- Forks
- 45
- Merge médio
- 1d 13h
- PRs com merge (30d)
- 91
Preparar o ambiente
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de ai-driven-dev/framework
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 86/100
ai-driven-dev/framework#1311 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 79/100
ai-driven-dev/framework#1244 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
ai-driven-dev/framework#1197 ·
Mantenedores costumam responder em até 1 dia
-
refactor(aidd-context): apply the new skill template to learnTalvez já em andamento @blafourcade assumiu há 3 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
ai-driven-dev/framework#1186 · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 83/100
ai-driven-dev/framework#1163 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
Todas as issues de ai-driven-dev/framework
Issues semelhantes
-
type: bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 2 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 67/100
db-ux-design-system/core-web#8856 ·
Mantenedores costumam responder em até 1 dia
-
'!' breaking change is lost when the commit also has an empty BREAKING CHANGE footerTalvez já em andamento @wittdennis assumiu hoje. Abertapriority: p3 type: bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
googleapis/release-please#2971 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 87/100
Mantenedores costumam responder em até 1 dia
-
🛠️ dette technique
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 61/100
betagouv/mon-entreprise#4752 · 1 comentário ·
Mantenedores costumam responder em até 5 dias