Cursor IDE opens the browser / changes tab even if not on focus whenever an agent finishes working

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Whenever an agent finishes up and answers a prompt, the Cursor IDE opens up unexpectedly and opens the browser or the changes tab.

Steps to Reproduce

Open an agent, send a text, after it finishes answering it’ll get main focus (even if it wasn’t open) and open the browser/changes tab.

Expected Behavior

After it finishes answering, it should stay unfocused and not open the browser/changes tab.

Screenshots / Screen Recordings

Operating System

MacOS

Version Information

Version: 3.13.10
VS Code Extension API: 1.128.0
Commit: 4f02290ccd9304f0e6bf8ee85f6e9106f02ac1f0
Date: 2026-07-23T21:41:07.333Z
Layout: Agent Window
Build Type: Stable
Release Track: Default
Electron: 40.10.3
Chromium: 144.0.7559.236
Node.js: 24.15.0
V8: 14.4.258.32-electron.0
xterm.js: 6.1.0-beta.256
OS: Darwin arm64 25.5.0

Additional Information

Started happening this morning. I got prompted with an update and it didn’t help. Closed and opened again and didn’t help.

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey @Gabriel_Roa!

I tried to reproduce this but wasn’t able to. On my side Cursor doesn’t steal focus or open the Changes tab when an agent finishes.

One thing I spotted in your video: at around 13.7s, there’s a file open called after-agent-response.js. That looks like a hook, and an afterAgentResponse hook runs every time an agent finishes replying, so I’m wondering whether it’s playing a part here.

You can see every hook running in your project under Customize → Hooks, filtered down to the relevant workspace. If there’s one registered there, could you share what the script does?