Skip to content

Conversation

@ammar-agent
Copy link
Collaborator

Blocks sleep at the start of bash commands to prevent agents from wasting time waiting. Agents are instructed via error message to use polling loops instead (while ! condition; do sleep 1; done).

Pattern: /^\s*sleep\s/ - Only blocks sleep at the beginning, not in loops or after other commands.

Examples:

  • Blocked: sleep 5
  • Allowed: while ! test -f done; do sleep 1; done
  • Allowed: echo start; sleep 2

Tests verify blocking behavior and confirm sleep works correctly in polling loops.

Generated with cmux

Block sleep at the beginning of bash commands to prevent agents from
wasting time waiting. Polling loops with sleep are still allowed.

Error message guides agents to use 'while ! condition; do sleep 1; done'
instead of standalone 'sleep N'.

Pattern: /^\s*sleep\s/ - only matches sleep at start, not in loops or
after other commands.
@ammario ammario enabled auto-merge October 15, 2025 02:51
@ammario ammario added this pull request to the merge queue Oct 15, 2025
Merged via the queue into main with commit 16931a0 Oct 15, 2025
7 checks passed
@ammario ammario deleted the bash-sleep branch October 15, 2025 03:09
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