Skip to content

Conversation

@ammar-agent
Copy link
Collaborator

Add optional niceness parameter to the executeBash IPC call for controlling process priority. This parameter is only available at the IPC level and is not exposed to agents in tool descriptions.

Changes

  • Add niceness parameter to IPC interface: Added optional niceness parameter to executeBash options (accepts -20 to 19, where lower = higher priority)
  • Wire through stack: Parameter flows from IPC → ipcMain handler → bash tool → process spawn
  • Bash tool implementation: When niceness is specified, commands are wrapped with nice -n <value>
  • Frontend git operations: Set all git-related executeBash calls to use niceness 19 (lowest priority) to prevent background operations from interfering with user interactions
  • Auto-dependency installation: Added ensure-deps Makefile target that automatically runs bun install if node_modules doesn't exist

Technical Details

When niceness is provided, the bash tool wraps commands like:

nice -n 19 bash -c "original command"

All git operations in GitStatusContext and GitStatusIndicator now run at lowest priority:

  • Git fetch (30s timeout)
  • Git status checks (5s timeout)
  • Git diff operations (5s timeout)

Generated with cmux

- Add optional niceness parameter to executeBash IPC interface
- Wire through ipcMain handler to bash tool configuration
- Bash tool wraps commands with nice when niceness is specified
- Parameter only available at IPC level, not exposed to agents
- Add ensure-deps Makefile target to auto-install dependencies
Set niceness to 19 (lowest priority) for all git-related executeBash
calls in the frontend to prevent background git operations from
interfering with user interactions.
@ammario ammario added this pull request to the merge queue Oct 10, 2025
Merged via the queue into main with commit af6ad38 Oct 10, 2025
7 checks passed
@ammario ammario deleted the bash-nice branch October 10, 2025 18:14
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.

2 participants