[codex] Fix ctx_shell MCP command hangs#132
Closed
xsploit wants to merge 1 commit into
Closed
Conversation
Owner
|
Thank you @xsploit for this excellent contribution! 🙌 The core fixes from this PR have been manually merged into v3.2.9 with the following additions: What was adopted from your PR:
Additional change on top of your PR:
Released in v3.2.9. You're credited in the CHANGELOG. Thanks for the thorough analysis and clean PR! |
Owner
|
Merged manually in v3.2.9. See comment above for details. |
yvgude
pushed a commit
that referenced
this pull request
May 29, 2026
Pure robustness hardening from the codebase review (no behavior change for successful paths, no UX impact): - config set: return Err instead of panicking when an intermediate config.toml key holds a non-table value (#130) - shell exec (Windows): fall back to inline PowerShell if the temp script file cannot be created instead of .expect panic (#131) - proxy: fall back to Ctrl-C if the SIGTERM handler cannot be installed (#132) - bm25_cache + ctx_compose: isolate background-thread panics with catch_unwind so a worker panic can't silently die / leak state (#133) - session / cost-attribution / semantic-index / agent-registry: log save() failures via tracing::warn! instead of swallowing them (#134) Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Summary
ctx_shellchild processes from inheriting MCP stdio, which can block commands like Git inside MCP sessions.git --version.Root cause
The MCP server uses stdin for JSON-RPC. Commands launched by
ctx_shellinherited that stdin, so interactive or stdin-aware tools could block on the protocol stream instead of receiving EOF.Validation
cargo test --locked execute_command -- --nocapturecargo test --locked git_version_returns -- --nocapturegit diff --checkctx_shellreturnedgit --versionandgit status --short --branchimmediately after reinstalling the patched binary.