Queued agent messages not triggering expected hooks

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

When a series of messages are queued in the agent tab, some of the expected hooks are missing.

I see one beforeSubmitPrompt, afterAgentResponse and stop hook - which appear to be for the last queued message only. I also see afterAgentThought for each queued message, but no other hooks.

Steps to Reproduce

Send a series of messages in rapid succession so they become queued and observe the hooks with a logger.

Expected Behavior

Each queued message triggers a beforeSubmitPrompt, afterAgentThought, afterAgentResponse and stop hook, like happens with messages sent normally.

Operating System

Windows 10/11
MacOS

Version Information

Version: 2.6.20 (user setup)
VSCode Version: 1.105.1
Commit: b29eb4ee5f9f6d1cb2afbc09070198d3ea6ad760
Date: 2026-03-17T01:50:02.404Z
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.26200

Additional Information

Hook logging output:
{“conversation_id”:“7139b1dc-76a6-4577-a18a-d0bea2dc27bc”,“generation_id”:“6b062c85-aaea-41bb-b60a-d7072457ea83”,“model”:“default”,“prompt”:“hello”,“attachments”:,“hook_event_name”:“beforeSubmitPrompt”,“cursor_version”:“2.6.20”,“workspace_roots”:[“/c:/Users/tyler/CodingProject”],“user_email”:“…”,“transcript_path”:null,“_logged_at”:“2026-03-18T16:22:00.636718+00:00”}
{“conversation_id”:“7139b1dc-76a6-4577-a18a-d0bea2dc27bc”,“generation_id”:“6b062c85-aaea-41bb-b60a-d7072457ea83”,“text”:“Creating a greeting\n\nI want to come up with a simple greeting for the user. Maybe I could just say something friendly like, \u00e2\u20ac\u0153Hi there! How can I help you today?\u00e2\u20ac\udc9d It feels welcoming and open-ended, inviting them to share what they need help with. I want to keep it light and easy, so they feel comfortable engaging with me. I’m curious if that strikes the right balance!”,“duration_ms”:1546,“model”:“default”,“hook_event_name”:“afterAgentThought”,“cursor_version”:“2.6.20”,“workspace_roots”:[“/c:/Users/tyler/CodingProject”],“user_email”:“…”,“transcript_path”:null,“_logged_at”:“2026-03-18T16:22:05.428876+00:00”}
{“conversation_id”:“7139b1dc-76a6-4577-a18a-d0bea2dc27bc”,“generation_id”:“6b062c85-aaea-41bb-b60a-d7072457ea83”,“text”:“Responding to greeting\n\nThe user just said hello! I think it’s great to greet them back warmly. I should ask what they want or how I can help them today. It\u00e2\u20ac\u2122s important to make them feel welcome and encourage them to share more. So, I\u00e2\u20ac\u2122ll go ahead with a friendly response, maybe something like, \u00e2\u20ac\u0153Hi there! How can I assist you today?\u00e2\u20ac\udc9d This way, I\u00e2\u20ac\u2122m opening up the conversation for them.”,“duration_ms”:3020,“model”:“default”,“hook_event_name”:“afterAgentThought”,“cursor_version”:“2.6.20”,“workspace_roots”:[“/c:/Users/tyler/CodingProject”],“user_email”:“…”,“transcript_path”:“c:\Users\tyler\.cursor\projects\c-Users-tyler-CodingProject\agent-transcripts\7139b1dc-76a6-4577-a18a-d0bea2dc27bc\7139b1dc-76a6-4577-a18a-d0bea2dc27bc.jsonl”,“_logged_at”:“2026-03-18T16:22:10.703054+00:00”}
{“conversation_id”:“7139b1dc-76a6-4577-a18a-d0bea2dc27bc”,“generation_id”:“6b062c85-aaea-41bb-b60a-d7072457ea83”,“text”:“Responding to greetings\n\nThe user keeps saying hello, which is interesting. I think I should respond with a concise greeting back to greet them warmly. Maybe I can ask if they have a preference for how to continue the conversation? I want to keep things friendly and inviting, so a simple "Hello! How can I help you today?" might work well. This way, I can encourage them to share what\u00e2\u20ac\u2122s on their mind!”,“duration_ms”:2093,“model”:“default”,“hook_event_name”:“afterAgentThought”,“cursor_version”:“2.6.20”,“workspace_roots”:[“/c:/Users/tyler/CodingProject”],“user_email”:“…”,“transcript_path”:“c:\Users\tyler\.cursor\projects\c-Users-tyler-CodingProject\agent-transcripts\7139b1dc-76a6-4577-a18a-d0bea2dc27bc\7139b1dc-76a6-4577-a18a-d0bea2dc27bc.jsonl”,“_logged_at”:“2026-03-18T16:22:15.128834+00:00”}
{“conversation_id”:“7139b1dc-76a6-4577-a18a-d0bea2dc27bc”,“generation_id”:“6b062c85-aaea-41bb-b60a-d7072457ea83”,“text”:“Considering user greetings\n\nThe user keeps saying hello, so I think they probably just want a greeting back! I should keep my response friendly but concise to match the low verbosity. It’s a simple interaction, but I want to make sure they feel acknowledged without offering too much. Just a warm, quick hello should do the trick! Let’s make it engaging but brief.”,“duration_ms”:1657,“model”:“default”,“hook_event_name”:“afterAgentThought”,“cursor_version”:“2.6.20”,“workspace_roots”:[“/c:/Users/tyler/CodingProject”],“user_email”:“…”,“transcript_path”:“c:\Users\tyler\.cursor\projects\c-Users-tyler-CodingProject\agent-transcripts\7139b1dc-76a6-4577-a18a-d0bea2dc27bc\7139b1dc-76a6-4577-a18a-d0bea2dc27bc.jsonl”,“_logged_at”:“2026-03-18T16:22:21.100731+00:00”}
{“conversation_id”:“7139b1dc-76a6-4577-a18a-d0bea2dc27bc”,“generation_id”:“6b062c85-aaea-41bb-b60a-d7072457ea83”,“text”:“I see that the user is saying hello multiple times. I think it would be nice to respond in a friendly way and possibly follow up with an open question to keep the conversation going. I want to keep my response straightforward and engaging, without being too verbose. It seems like a good approach to create a welcoming atmosphere and encourage more interaction! Let’s keep it light and inviting.”,“duration_ms”:1455,“model”:“default”,“hook_event_name”:“afterAgentThought”,“cursor_version”:“2.6.20”,“workspace_roots”:[“/c:/Users/tyler/CodingProject”],“user_email”:“…”,“transcript_path”:“c:\Users\tyler\.cursor\projects\c-Users-tyler-CodingProject\agent-transcripts\7139b1dc-76a6-4577-a18a-d0bea2dc27bc\7139b1dc-76a6-4577-a18a-d0bea2dc27bc.jsonl”,“_logged_at”:“2026-03-18T16:22:24.827021+00:00”}
{“conversation_id”:“7139b1dc-76a6-4577-a18a-d0bea2dc27bc”,“generation_id”:“6b062c85-aaea-41bb-b60a-d7072457ea83”,“text”:“I’m noticing that the user keeps saying hello, which suggests they might just want a friendly greeting. I think it’s important to keep my response concise since that’s likely what they\u00e2\u20ac\u2122re looking for. I want to ensure I’m being welcoming without overdoing it. A simple, warm acknowledgment could make their day! So, I\u00e2\u20ac\u2122ll focus on delivering a friendly greeting that matches the user’s intent while keeping things brief.”,“duration_ms”:1596,“model”:“default”,“hook_event_name”:“afterAgentThought”,“cursor_version”:“2.6.20”,“workspace_roots”:[“/c:/Users/tyler/CodingProject”],“user_email”:“…”,“transcript_path”:“c:\Users\tyler\.cursor\projects\c-Users-tyler-CodingProject\agent-transcripts\7139b1dc-76a6-4577-a18a-d0bea2dc27bc\7139b1dc-76a6-4577-a18a-d0bea2dc27bc.jsonl”,“_logged_at”:“2026-03-18T16:22:28.445432+00:00”}
{“conversation_id”:“7139b1dc-76a6-4577-a18a-d0bea2dc27bc”,“generation_id”:“6b062c85-aaea-41bb-b60a-d7072457ea83”,“model”:“default”,“text”:“Hello! \n\nI\u00e2\u20ac\u2122m ready whenever you are\u00e2\u20ac\u201dtell me in a few words what you\u00e2\u20ac\u2122d like help with (coding, learning Python, fixing an error, etc.).”,“hook_event_name”:“afterAgentResponse”,“cursor_version”:“2.6.20”,“workspace_roots”:[“/c:/Users/tyler/CodingProject”],“user_email”:“…”,“transcript_path”:“c:\Users\tyler\.cursor\projects\c-Users-tyler-CodingProject\agent-transcripts\7139b1dc-76a6-4577-a18a-d0bea2dc27bc\7139b1dc-76a6-4577-a18a-d0bea2dc27bc.jsonl”,“_logged_at”:“2026-03-18T16:22:28.882442+00:00”}
{“conversation_id”:“7139b1dc-76a6-4577-a18a-d0bea2dc27bc”,“generation_id”:“6b062c85-aaea-41bb-b60a-d7072457ea83”,“model”:“default”,“status”:“completed”,“loop_count”:0,“hook_event_name”:“stop”,“cursor_version”:“2.6.20”,“workspace_roots”:[“/c:/Users/tyler/CodingProject”],“user_email”:“…”,“transcript_path”:“c:\Users\tyler\.cursor\projects\c-Users-tyler-CodingProject\agent-transcripts\7139b1dc-76a6-4577-a18a-d0bea2dc27bc\7139b1dc-76a6-4577-a18a-d0bea2dc27bc.jsonl”,“_logged_at”:“2026-03-18T16:22:29.739901+00:00”}

Conversation history file:
{“role”:“user”,“message”:{“content”:[{“type”:“text”,“text”:“<user_query>\nhello\n</user_query>”}]}}
{“role”:“assistant”,“message”:{“content”:[{“type”:“text”,“text”:“Hi Tyler! \n\nWhat would you like to work on in your CodingProject today?\n\nCreating a greeting\n\nI want to come up with a simple greeting for the user. Maybe I could just say something friendly like, “Hi there! How can I help you today?” It feels welcoming and open-ended, inviting them to share what they need help with. I want to keep it light and easy, so they feel comfortable engaging with me. I’m curious if that strikes the right balance!”}]}}
{“role”:“user”,“message”:{“content”:[{“type”:“text”,“text”:“<user_query>\nhello\n</user_query>”}]}}
{“role”:“assistant”,“message”:{“content”:[{“type”:“text”,“text”:“Hi again! \n\nWhat would you like to do with your Python file or project right now?\n\nResponding to greeting\n\nThe user just said hello! I think it’s great to greet them back warmly. I should ask what they want or how I can help them today. It’s important to make them feel welcome and encourage them to share more. So, I’ll go ahead with a friendly response, maybe something like, “Hi there! How can I assist you today?” This way, I’m opening up the conversation for them.”}]}}
{“role”:“user”,“message”:{“content”:[{“type”:“text”,“text”:“<user_query>\nhello\n</user_query>”}]}}
{“role”:“assistant”,“message”:{“content”:[{“type”:“text”,“text”:“Hi Tyler! \n\nI see you’re in hello.py. \nDo you want help writing or running that script, or are you just testing Cursor right now?\n\nResponding to greetings\n\nThe user keeps saying hello, which is interesting. I think I should respond with a concise greeting back to greet them warmly. Maybe I can ask if they have a preference for how to continue the conversation? I want to keep things friendly and inviting, so a simple "Hello! How can I help you today?" might work well. This way, I can encourage them to share what’s on their mind!”}]}}
{“role”:“user”,“message”:{“content”:[{“type”:“text”,“text”:“<user_query>\nhello\n</user_query>”}]}}
{“role”:“assistant”,“message”:{“content”:[{“type”:“text”,“text”:“Hello! \n\nHow can I help you with your code or project right now?”}]}}
{“role”:“user”,“message”:{“content”:[{“type”:“text”,“text”:“<user_query>\nhello\n</user_query>”}]}}
{“role”:“assistant”,“message”:{“content”:[{“type”:“text”,“text”:“Hello! \n\nTell me what you’d like to build or learn, and I’ll help step by step.\n\nConsidering user greetings\n\nThe user keeps saying hello, so I think they probably just want a greeting back! I should keep my response friendly but concise to match the low verbosity. It’s a simple interaction, but I want to make sure they feel acknowledged without offering too much. Just a warm, quick hello should do the trick! Let’s make it engaging but brief.”}]}}
{“role”:“user”,“message”:{“content”:[{“type”:“text”,“text”:“<user_query>\nhello\n</user_query>”}]}}
{“role”:“assistant”,“message”:{“content”:[{“type”:“text”,“text”:“Hello Tyler! \n\nIf you’re just testing: yes, I’m here and working. \nIf you want to try something, tell me in a few words (for example: “make hello.py print hello” or “help me learn Python”).\n\nI see that the user is saying hello multiple times. I think it would be nice to respond in a friendly way and possibly follow up with an open question to keep the conversation going. I want to keep my response straightforward and engaging, without being too verbose. It seems like a good approach to create a welcoming atmosphere and encourage more interaction! Let’s keep it light and inviting.”}]}}
{“role”:“user”,“message”:{“content”:[{“type”:“text”,“text”:“<user_query>\nhello\n</user_query>”}]}}
{“role”:“assistant”,“message”:{“content”:[{“type”:“text”,“text”:“Hello! \n\nI’m ready whenever you are—tell me in a few words what you’d like help with (coding, learning Python, fixing an error, etc.).\n\nI’m noticing that the user keeps saying hello, which suggests they might just want a friendly greeting. I think it’s important to keep my response concise since that’s likely what they’re looking for. I want to ensure I’m being welcoming without overdoing it. A simple, warm acknowledgment could make their day! So, I’ll focus on delivering a friendly greeting that matches the user’s intent while keeping things brief.”}]}}

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the detailed report, the logs were really helpful.

Confirmed, this is a bug. When messages are queued and handled through the cursor-agent backend, they go through a different code path that skips the beforeSubmitPrompt, afterAgentResponse, and stop hooks. afterAgentThought still works because it’s called elsewhere, independent of the send flow.

I’ve passed this to the team. No ETA yet, but your report helps us prioritize it. I’ll update the thread if there’s any news.

Great! Thanks for the quick response