Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
AwaitShell continued displaying “Waiting up to 1h 50m…” despite the tracked shell command having already completed with exit_code 1 and a full completion footer in the terminal artifact. The shell started at 2026-08-26 14:33:57 UTC, completed at 14:34:10 UTC (elapsed_ms: 12962), and left approximately 690 lines of output with a completion footer. AwaitShell did not recognize the completion and waited for the full 119-minute timeout.
Steps to Reproduce
- Luna subagent started a shell command with
block_until_ms: 1000, which sent the shell to the background - Luna then called
AwaitShell(shell_id=883310, block_until_ms=7140000)without a pattern - The command started at 2026-08-26 14:33:57 UTC
- The command completed at 14:34:10 UTC with
exit_code: 1andelapsed_ms: 12962 - The terminal artifact contained the complete completion footer plus approximately 690 lines of Java stack trace
- Despite this, AwaitShell continued displaying “Waiting up to 1h 50m…” and did not return for the full 119-minute timeout
Expected Behavior
AwaitShell should return immediately when the tracked shell already has a completion footer in the terminal artifact, regardless of output size or exit code.
Operating System
Windows 10/11
Version Information
Windows 10, build 10.0.26200, PowerShell, current installed Cursor build, Luna subagent (/subagent-low)
For AI issues: which model did you use?
Luna subagent (/subagent-low)
Additional Information
Actual behavior:
AwaitShell missed the completion and waited for the full 119-minute timeout.
Important distinctions:
- This is not merely the usual 10–30 second Windows terminal completion delay.
- The completion footer was present; it was not missing.
- No active process was still running.
--lastwas not a valid workaround because the npm fallback does not write the same run artifact.
Workaround:
Interrupt AwaitShell/the subagent and read the terminal artifact directly. During recovery, do not use unrelated “latest” result artifacts.
Related threads:
- [BUG] Terminal tool gets stuck after exit code — reports terminal/agent hangs after commands, but not AwaitShell missing an already-written completion footer.
- Post-execution delay where agent remains in “running command” state after output is already returned — describes an approximately 10–20 second post-execution delay, not a completed shell being waited on for 119 minutes.
- Cursor hangs executing a snippet "agent is waiting for a command" — concerns command-completion detection during snippets; here the command had already exited and the artifact footer was present.
The exact combination of AwaitShell, a completed footer, and Luna /subagent-low was not found in the related threads.
Does this stop you from using Cursor
No - Cursor works, but with this issue