Skip to content

fix(mcp): keep stdio extensions alive across worker exits - #10364

Merged
michaelneale merged 2 commits into
aaif-goose:mainfrom
iroiro147:fix/stdio-mcp-pdeathsig-9332
Aug 20, 2026
Merged

michaelneale merged 2 commits into
aaif-goose:mainfrom
iroiro147:fix/stdio-mcp-pdeathsig-9332

Conversation

@iroiro147

Copy link
Copy Markdown
Contributor

Summary

  • add a long-lived subprocess configuration path that keeps process-group/no-window setup but skips Linux PR_SET_PDEATHSIG
  • use that path for stdio MCP extension child processes, while provider/CLI subprocesses keep the existing parent-death behavior
  • add a Linux regression that checks a long-lived child spawned from a short-lived Tokio worker thread remains alive until explicitly cleaned up

Fixes #9332.

Tests

  • source bin/activate-hermit && cargo fmt --check
  • source bin/activate-hermit && cargo clippy -p goose --all-targets -- -D warnings
  • source bin/activate-hermit && cargo test -p goose --test subprocess_cleanup (macOS target compiles the Linux-gated test binary; 0 tests run locally)
  • source bin/activate-hermit && cargo test -p goose agents::extension_manager::tests (27 passed)
  • source bin/activate-hermit && cargo test -p goose (1328 passed, 7 unrelated local/environment failures: database path setup, one platform-specific snapshot, and jsonwebtoken CryptoProvider initialization)

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bd306a1f48

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/goose/src/agents/extension_manager.rs Outdated
Signed-off-by: iroiro147 <sarthak.singh@juspay.in>
Signed-off-by: iroiro147 <sarthak.singh@juspay.in>
@DOsinga DOsinga assigned lifeizhou-ap and unassigned michaelneale Aug 19, 2026
@michaelneale
michaelneale force-pushed the fix/stdio-mcp-pdeathsig-9332 branch from 6cf2f9c to 3e58bc3 Compare August 19, 2026 21:56
@michaelneale
michaelneale added this pull request to the merge queue Aug 20, 2026
Merged via the queue into aaif-goose:main with commit bc68049 Aug 20, 2026
24 checks passed
jbg added a commit that referenced this pull request Aug 20, 2026
* origin/main: (50 commits)
  chore(deps): bump the ui-minor-and-patch group across 1 directory with 53 updates (#11386)
  fix(security): bound call graph traversal (#11193)
  fix: pin arrayref to known-good commit (#11389)
  feat(providers): add SayGM as declarative OpenAI-compatible provider (#11267)
  feat(providers): custom provider cost fields drive cost tracking (config-declared pricing fallback) (#11220)
  fix(deps): repair dangling syn reference in Cargo.lock (#11385)
  fix(flake): add cudaforge hash for git dependency (#10910)
  feat: auto-focus chat input when user starts typing (#11184)
  fix(security): fail closed on invalid Codex ACP mode (#11362)
  fix(mcp): keep stdio extensions alive across worker exits (#10364)
  feat(ui): collapse scheduled job sessions into accordion in chat history (#11265)
  fix: bound retry command diagnostics (#11365)
  Disable thinking for tool call labels (#11207)
  fix(review): contain REVIEW.md discovery (#11367)
  fix(acp): preserve tool result audience metadata (#11375)
  test(providers): isolate environment-proxy test in its own binary (#11262)
  fix(security): bind Foundry API keys to request origin (#11347)
  fix: canonicalize mangled tool names before permission inspection (follow-up to #10230) (#10285)
  feat(providers): add Lynkr as a declarative OpenAI-compatible provider (#11372)
  fix: sanitize Pi imported output (#10990)
  ...

# Conflicts:
#	crates/goose/src/agents/state_machine/tests/hooks_lifecycle.rs
jbg added a commit that referenced this pull request Aug 20, 2026
* origin/main: (59 commits)
  chore(deps): bump the ui-minor-and-patch group across 1 directory with 53 updates (#11386)
  fix(security): bound call graph traversal (#11193)
  fix: pin arrayref to known-good commit (#11389)
  feat(providers): add SayGM as declarative OpenAI-compatible provider (#11267)
  feat(providers): custom provider cost fields drive cost tracking (config-declared pricing fallback) (#11220)
  fix(deps): repair dangling syn reference in Cargo.lock (#11385)
  fix(flake): add cudaforge hash for git dependency (#10910)
  feat: auto-focus chat input when user starts typing (#11184)
  fix(security): fail closed on invalid Codex ACP mode (#11362)
  fix(mcp): keep stdio extensions alive across worker exits (#10364)
  feat(ui): collapse scheduled job sessions into accordion in chat history (#11265)
  fix: bound retry command diagnostics (#11365)
  Disable thinking for tool call labels (#11207)
  fix(review): contain REVIEW.md discovery (#11367)
  fix(acp): preserve tool result audience metadata (#11375)
  test(providers): isolate environment-proxy test in its own binary (#11262)
  fix(security): bind Foundry API keys to request origin (#11347)
  fix: canonicalize mangled tool names before permission inspection (follow-up to #10230) (#10285)
  feat(providers): add Lynkr as a declarative OpenAI-compatible provider (#11372)
  fix: sanitize Pi imported output (#10990)
  ...
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.

configure_parent_death_signal (PR_SET_PDEATHSIG, SIGTERM) silently kills stdio MCP subprocesses on multi-threaded Tokio runtime

3 participants