docs(rules): do not background shell commands for later results - #186
Open
ryuhaneul wants to merge 1 commit into
Open
docs(rules): do not background shell commands for later results#186ryuhaneul wants to merge 1 commit into
ryuhaneul wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A shell command started in the background (e.g. Claude Code's
Bashtool withrun_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.