# Stop hook followups fail to land after waiting for background tasks

**URL:** <https://forum.cursor.com/t/stop-hook-followups-fail-to-land-after-waiting-for-background-tasks/161164>\
**Category:** Bug Reports\
**Tags:** cli, hooks\
**Created:** [May 20, 2026, 9:26pm UTC](https://forum.cursor.com/t/stop-hook-followups-fail-to-land-after-waiting-for-background-tasks/161164 "2026-05-20T21:26:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shurui\_Gui](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@Shurui\_Gui](https://forum.cursor.com/u/Shurui_Gui)\
**Post date:** [May 20, 2026, 9:26pm UTC](https://forum.cursor.com/t/stop-hook-followups-fail-to-land-after-waiting-for-background-tasks/161164/1 "2026-05-20T21:26:01Z")

</div>

### Where does the bug appear (feature/product)?

Cursor CLI

### Describe the Bug

Stop hook followups fail to land after waiting for background tasks.

### Steps to Reproduce

1. When a CLI agent waits for background tasks, a stop hook is fired, and leads to a followup message queued. (Figure 1)
2. When the background tasks finished and the agent really stopped (idle), the queued message is still in queue (follow-ups) and failed to input as a prompt. (Figure 2)

### Expected Behavior

When the agent goes idle, the follow-up message should land as a user prompt.

### Operating System

Linux

### Version Information

About Cursor CLI

CLI Version 2026.05.16-0338208  
Model GPT-5.4 272K Medium  
Subscription Tier Enterprise  
OS linux (x64)  
Terminal vscode  
Shell zsh

### For AI issues: which model did you use?

Any

### Does this stop you from using Cursor

Yes - Cursor is unusable

---

<div class="post-metadata">

**Author:** ![Shurui\_Gui](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@Shurui\_Gui](https://forum.cursor.com/u/Shurui_Gui)\
**Post date:** [May 20, 2026, 9:26pm UTC](https://forum.cursor.com/t/stop-hook-followups-fail-to-land-after-waiting-for-background-tasks/161164/4 "2026-05-20T21:26:44Z")

</div>

Figure 1:

 ![Screenshot 2026-05-20 at 2.18.22 PM](https://us1.discourse-cdn.com/cursor1/original/3X/9/4/944df23fb7c8e31a9a7748e30edad26c193326e9.png)

Figure 2:

 ![Screenshot 2026-05-20 at 2.18.59 PM](https://us1.discourse-cdn.com/cursor1/original/3X/5/d/5d98c1711802ed097e43f242b09298418a784d03.png)

In addition, any further followups are blocked. The followup queue seems broken after this behavior.

---

<div class="post-metadata">

**Author:** ![mohitjain](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/mohitjain/32/100229_2.png) [@mohitjain](https://forum.cursor.com/u/mohitjain)\
**Post date:** [May 21, 2026, 7:57am UTC](https://forum.cursor.com/t/stop-hook-followups-fail-to-land-after-waiting-for-background-tasks/161164/7 "2026-05-21T07:57:57Z")

</div>

Thanks for the detailed report and screenshots. I attempted to reproduce this on both macOS and Linux with a stop hook that introduces a deliberate delay and returns a `followup_message`, combined with a short background shell task. Across multiple attempts with varying timing windows (2s–8s hook delays), the followup consistently landed as expected.

A few things that would help narrow this down:

1. Could you share your stop hook script? Your screenshots show the followup originates from a `monitor_script` hook. Understanding the hook’s logic (especially any file I/O, transcript reads, or network calls) would help me reproduce the exact timing conditions.

2. Could you check the Hooks Execution Log? Go to Cursor Settings \> Hooks \> Execution Log — this shows whether the hook fired, what payload it received, and the response it returned. A screenshot or copy of the log entries around the time of the stuck followup would confirm whether the hook executed correctly on Cursor’s side.

3. Is this reproducible on every session, or intermittent? If intermittent, roughly how often does it trigger (1 in 3 sessions? 1 in 10?)?

4. Are there other hooks configured besides the stop hook? If you have `afterFileEdit`, `sessionStart`, or other hooks that interact with the same state (edit markers, transcript files), the combination may affect timing.

This would help us pin down the specific conditions that trigger the race.

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [June 20, 2026, 7:58am UTC](https://forum.cursor.com/t/stop-hook-followups-fail-to-land-after-waiting-for-background-tasks/161164/8 "2026-06-20T07:58:07Z")

</div>

Closed on June 20, 2026, 7:58am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
