Skip to content

Conversation

@ammar-agent
Copy link
Collaborator

Summary

Allow bash_output to wait for any amount of time (removing the previous 15-second limit), while ensuring the chat stays responsive by detecting when users queue new messages.

Changes

1. Remove timeout limit

  • Removed .max(15) constraint from the schema
  • Updated description to guide agents: "Only use long timeouts (>15s) when no other useful work can be done in parallel"

2. Add abort signal support

  • getOutput() accepts optional abortSignal parameter
  • Returns status: "interrupted" when stream is cancelled

3. Add queued message detection

  • Added setMessageQueued() / hasQueuedMessage() to BackgroundProcessManager
  • queueMessage() sets the flag; sendQueuedMessages() / clearQueue() clears it
  • getOutput() checks for queued messages in polling loop and returns early

Flow when user sends message during bash_output wait:

  1. queueMessage()setMessageQueued(workspaceId, true)
  2. bash_output's getOutput() polling loop detects hasQueuedMessage() = true
  3. Returns { status: "interrupted", output: "(waiting interrupted)" }
  4. tool-call-end fires → sendQueuedMessages() processes queued message

4. UI update

  • ProcessStatusBadge now supports "interrupted" status with warning color

Testing

  • Added test for abort signal interruption
  • Added test for queued message interruption
  • All 14 bash_output tests pass

Generated with mux

…ption

- Remove .max(15) limit from bash_output timeout_secs schema
- Add abort signal support to getOutput() for stream cancellation
- Add queued message detection so bash_output returns early when user
  sends a new message during a long wait
- Update tool description to guide agents: only use long timeouts when
  no other useful work can be done in parallel
- Add 'interrupted' status to ProcessStatusBadge UI component
- Add tests for abort signal and queued message interruption

The flow when user sends message during bash_output wait:
1. queueMessage() sets backgroundProcessManager.setMessageQueued(true)
2. bash_output's getOutput() polling loop detects hasQueuedMessage()
3. Returns early with status: 'interrupted'
4. tool-call-end fires, sendQueuedMessages() processes queued message
@chatgpt-codex-connector
Copy link

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@ammario ammario merged commit df8a180 into main Dec 10, 2025
46 of 50 checks passed
@ammario ammario deleted the bash-output-60sec-timeout branch December 10, 2025 00:42
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