fix(cli): opencode run drops a Stop hook's continuation
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 70/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- node.js, typescript
- Lĩnh vực
- cli, developer-experience
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 481
- Fork
- 45
- Merge trung bình
- 1 ngày 13 giờ
- Pull request đã merge (30 ngày)
- 91
Chuẩn bị môi trường
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ai-driven-dev/framework
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
ai-driven-dev/framework#1311 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
ai-driven-dev/framework#1244 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
ai-driven-dev/framework#1197 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
refactor(aidd-context): apply the new skill template to learnCó thể đã có người làm @blafourcade đã nhận 3 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ai-driven-dev/framework#1186 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
ai-driven-dev/framework#1163 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của ai-driven-dev/framework
Issue tương tự
-
db-d1-sqlite: upsert is aliased to updateOne, so payload.kv.set never inserts new keysCó thể đã có người làm @pcbeingused333 đã nhận hôm nay. Đang mởBug db: d1-sqlite Payload OSS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
payloadcms/payload#19766 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
device-management-toolkit/sample-web-ui#3711 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug impact:low Team: SecuritySolution Team:Defend Workflows v9.6.0
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
elastic/kibana#306401 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
agentes-chat/agentes-chat#927 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Closing a pinned tab jumps to the Tabs section instead of the next open pinned tabCó thể đã có người làm @seenimohamed đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
ardia-browser/ardia#2769 ·
Maintainer thường phản hồi trong vòng 1 ngày