Skip to content

fix: prevent interactive commands from stalling MCP shell#22

Merged
mudler merged 3 commits intomudler:masterfrom
localai-bot:fix/interactive-command-stall-20-upstream
Mar 3, 2026
Merged

fix: prevent interactive commands from stalling MCP shell#22
mudler merged 3 commits intomudler:masterfrom
localai-bot:fix/interactive-command-stall-20-upstream

Conversation

@localai-bot
Copy link
Contributor

This PR fixes issue #20 - Interactive commands causing MCP shell to stall indefinitely.

Changes

  • Add process group management for proper child process cleanup
  • Add detectInteractiveCommands function to warn about potentially interactive commands
  • Add process group kill on timeout to ensure all child processes are terminated

Testing

The fix ensures that:

  1. Interactive commands are detected and logged as warnings
  2. Process groups are properly managed for cleanup
  3. Timeout enforcement works correctly by killing entire process groups

Fixes: #20

localai-bot and others added 2 commits March 3, 2026 20:08
- Add process group management for proper child process cleanup
- Add detectInteractiveCommands function to warn about potentially interactive commands
- Add process group kill on timeout to ensure all child processes are terminated

Fixes: mudler#20
@localai-bot
Copy link
Contributor Author

✅ Fixed CI build failure - removed unused os/signal import that was causing the Docker build to fail. Branch has been updated and pushed. CI checks should now pass.

@mudler mudler merged commit 4e0b081 into mudler:master Mar 3, 2026
16 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in LocalAI Agent team Mar 3, 2026
@localai-bot localai-bot moved this from Done to In review in LocalAI Agent team Mar 3, 2026
@mudler mudler moved this from In review to Done in LocalAI Agent team Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

Interactive commands cause MCP shell to stall indefinitely, timeout ineffective

2 participants