ductor icon indicating copy to clipboard operation
ductor copied to clipboard

[Bug]: asked the bot to reboot, and it shut down

Open mkcount opened this issue 9 months ago • 2 comments

What happened?

After I asked the AI to edit the config file, it attempted to reboot on its own and the system unexpectedly shut down.

Steps to Reproduce

asked the bot in words via Telegram to reboot

Expected Behavior

A normal reboot

Operating System

Linux

Environment

Local (pip install)

Which LLM provider?

Codex

ductor version

0.12.0

/diagnose output


Relevant log output


LLM self-diagnosis (optional)

'ductor restart' uses a direct stop + re-exec path, which is different from the controlled in-bot restart flow used by /restart.

It stops the current process first, and that can cut off the active execution channel/session, so it appears as aborted even if the service later comes back.

Please guide the bot to use 'systemctl --user restart ductor' (or /restart) as the primary restart path.

Additional context

No response

Before submitting

  • [x] I have searched existing issues for duplicates.
  • [x] I am running the latest version.

mkcount avatar Mar 04 '26 12:03 mkcount

I can’t code at all, but it’s amazing that the AI explains everything to me.

mkcount avatar Mar 04 '26 12:03 mkcount

This already works — CLI agents just need to create a marker file:

touch ~/.ductor/restart-requested

The bot polls this file every 2 seconds and performs a clean restart (exit code 42, service manager restarts automatically).

We've added documentation for this in the workspace RULES.md and tools RULES.md (4e7743e) so all CLI agents (Claude, Codex, Gemini) know about the mechanism. No new tool script needed — it's a single touch command.

PleasePrompto avatar Mar 08 '26 03:03 PleasePrompto