Skip to content

docs(rules): do not background shell commands for later results - #186

Open
ryuhaneul wants to merge 1 commit into
PleasePrompto:mainfrom
ryuhaneul:docs/no-background-shell
Open

docs(rules): do not background shell commands for later results#186
ryuhaneul wants to merge 1 commit into
PleasePrompto:mainfrom
ryuhaneul:docs/no-background-shell

Conversation

@ryuhaneul

@ryuhaneul ryuhaneul commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Problem

A shell command started in the background (e.g. Claude Code's Bash tool with run_in_background) outlives the agent turn, but the CLI process that would deliver its completion does not: every provider turn runs as a fresh subprocess that exits once the turn completes (ductor_bot/cli/executor.py — both the one-shot and streaming paths spawn a process and await its exit).

The command still runs to completion, but its completion notification fires into a dead process and is lost. Nobody is notified, and the result only surfaces if someone happens to ask about it later.

Change

One bullet in the "Critical rules" list of the Work Delegation section, pointing agents at create_task.py — the durable path, whose result is delivered back to the chat on completion.

The existing ">30 seconds -> delegate to a background task" rule is framed as agent delegation, which doesn't obviously map to "I have a shell command to run in the background", so the failure mode recurs.

Docs only, no behaviour change.

A backgrounded shell command outlives the turn, but the CLI process that would
deliver its completion does not - the command finishes and nobody is notified.
Point agents at create_task.py when the result is needed in a later turn.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant