Skip to content
This repository was archived by the owner on Sep 23, 2026. It is now read-only.

fix(kaos): terminate local process trees - #2544

Open
lihailong00 wants to merge 1 commit into
MoonshotAI:mainfrom
lihailong00:codex/issue-2310-kill-children
Open

lihailong00 wants to merge 1 commit into
MoonshotAI:mainfrom
lihailong00:codex/issue-2310-kill-children

Conversation

@lihailong00

@lihailong00 lihailong00 commented Jul 23, 2026 •

Copy link
Copy Markdown

Summary

  • isolate every local KAOS command in its own process group/session
  • terminate the exact local process tree on cancellation or timeout
  • keep SSH and ACP implementations unchanged

Reproduction and verification

On Windows Git Bash, the regression test deterministically showed the old code killing only the Bash parent while a descendant survived and wait() timed out. The fixed test passed five consecutive runs.

  • uv run pytest packages/kaos/tests -q — 25 passed, 29 platform-skipped
  • targeted Ruff and Pyright — passed

This supersedes closed #2327 and avoids its reviewed platform-detection mismatch by using os.name consistently at both process creation and termination.

Closes #2310


Open in Devin Review

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

This branch has not been deployed

No deployments
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Shell tool timeout does not terminate child processes

1 participant