Bot pinned to an engine whose CLI is not installed fails every turn with no error message
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
- 56/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ệ
- typescript
- Lĩnh vực
- backend
Hướng nghiên cứu
Start in dist-server/server/drivers/pi.js at the child process close handler and compare it with the describeSpawnFailure path. Trace how settle(false) and bot.turn.end reach the chat, then check the related driver tests or add a regression test for a child that exits before the handshake. Done means the failure appears as a visible error in chat.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What happened
An engine can be saved in config.json (and even be the default model selection) while its CLI is not installed on the machine. Bots pinned to that engine then fail every turn, and the only trace is bot.turn.end ok:false in the trail log — the chat shows the person's message, then a [digest] · no tool activity, with no error text and no "install this engine" prompt. The bot looks like it ignored the message.
Expected: either the send is refused with the engine's own explanation, or the turn fails with a visible message — the same one GET /api/instances already produces:
piisn't installed, or isn't on this app's PATH. Install it for the user running dusk bot or use Set CLI, then check again.
Actual: the turn is accepted (POST /api/bots/<id>/messages → 202) and dies in a few hundred ms:
{"ev":"bot.turn.start","provider":"piAgent","turn":"ae7aab35-…"}
{"ev":"bot.turn.end","ok":false,"stop":"failed","ms":479}
No runtime.error event, nothing in logs/trail-server.jsonl, nothing in the chat.
Steps to reproduce
-
Have a
piengine saved with nopibinary installed for the user running dusk bot:"instances": { "pi": { "driver": "piAgent" } }, "defaultModelSelection": { "instanceId": "pi", "model": "opencode-go/hy4-flash-free" } -
Point a bot at it:
"modelSelection": { "instanceId": "pi", "model": "opencode-go/hy4-flash-free" } -
Send the bot any message.
Version
duskbot 0.2.12 (pi 1.5.2)
Platform
Linux (Ubuntu on WSL2), DUSK_BOT_BOX=required
Engine
pi (piAgent driver)
Logs or screenshots
Trail log for the failing turn — the only record of the failure:
{"ev":"bot.turn.start","provider":"piAgent","turn":"ae7aab35-…"}
{"ev":"bot.turn.end","ok":false,"stop":"failed","ms":479}
Why it is silent
In dist-server/server/drivers/pi.js the spawn failure path emits a runtime.error (describeSpawnFailure), but a child that exits during startup lands in the close handler:
child.on("close", () => {
rejectWaiters(new Error("pi process exited before replying"));
settle(false); // → stopReason "failed", no runtime.error emitted
});
settle(false) yields stopReason: "failed" with no message, so the failure never reaches the UI. Other drivers surface their failures in the chat; this path cannot.
Suggested fix
- In the
closehandler, emit aruntime.error(and abot.turn.endmessage) when the child exits before the handshake, e.g.describeSpawnFailureplus "the engine exited before it answered". - Optionally, refuse the send up front when the selected instance's snapshot is
unavailable, and reuse that snapshot'sreasonas the chat message.
Related pi-driver issues found while diagnosing the same turn
Both are fixable on this side; happy to file separately.
- The driver writes its per-turn MCP config under
TMPDIRand passes it asDUSK_MCP_CONFIG. The bot box replaces/tmpwith a private tmpfs, so the file is invisible to the boxed engine and the extension throwsdusk bot Pi MCP configuration could not be readbefore any RPC frame is sent. - The box runs the engine with
HOME=<data>/engine-home, into which only~/.pi/agent/auth.jsonis shared (ENGINE_FOLDERS), notmodels-store.json. The model list is then empty andset_modelanswersModel not found: opencode-go/hy4-flash-free, whileGET /api/instancesreports the same engine asavailablewith 34 models — the engine probe runs in the server's HOME, the turn does not.
- Ngôn ngữ chính
- TypeScript
- Star
- 277
- Fork
- 27
- Merge trung bình
- 2 giờ 47 phút
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 DuskBotAI/duskbot
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
Maintainer thường phản hồi trong vòng 1 ngày
-
After uninstalling an own server, the desktop app stays on it and shows Cloudflare's Error 1033 pageĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
install.sh --tailscale replaces whatever the host already serves on tailnet port 443Có thể đã có người làm @viniciusbregoli đã nhận hôm nay. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của DuskBotAI/duskbot
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
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
inabagumi/shinju-date#7406 ·
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 76/100
umami-software/umami#4787 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày