How to collect data for such a bug report?

I always use the legacy-terminal option. I recently decided to try disabling it: the new terminal works well overall, but sometimes it freezes.

After manually stopping and resuming Agent says “the process completed correctly, but the tool froze and didn’t return control”. I’m talking about the foreground Shell - I prohibited the background Shell.

How and what data should I collect to report this?

That “process completed correctly, but the tool froze and didn’t return control” signature is a known class of issue we’re tracking. The shell tool waits on the terminal’s command-completion signal, and when that signal doesn’t arrive it keeps waiting even though the process already exited. It’s entirely client-side, so backend logs won’t show anything useful, and a good report leans on local data. The most valuable things to capture, ideally while it’s actually frozen:

  1. Cursor version + OS (Cursor > About Cursor) and your shell profile (terminal.integrated.defaultProfile).
  2. Developer Tools console while it’s stuck: Help > Toggle Developer Tools > Console, then copy any red errors (shell-integration or timeout errors are the ones we care about).
  3. The exact command/script - roughly how long it runs, whether it spawns native child processes, whether it has quiet periods, and its exit code.
  4. Whether it reproduces with a different shell profile (on Windows, try cmd.exe). If cmd is fine, that isolates it to the PowerShell integration layer.
  5. The data point you already have - Legacy Terminal on avoids it, the new terminal freezes — is genuinely useful, so state it explicitly.

Post it in Bug Reports using the template; here’s the reference on what to include (Request ID + Console errors sections are the relevant bits): Reporting a bug.

Re-enabling the Legacy Terminal is the reliable workaround in the meantime, which I know you already lean on. If the console throws anything when it hangs, that’s usually the most telling piece - drop it in the report.