Local agent execution hangs without auto-terminating—terminal seems done but still throws an error

Hey, thanks for the report. I see the screenshot with Maven errors. This looks like a known issue where the agent can’t correctly detect when terminal commands finish.

Try Legacy Terminal as a workaround:

  • Settings > Cursor Settings > Agents > Legacy Terminal: enable it
  • Restart Cursor
  • Try running the command via the agent again

This helped in similar cases: Constant freezing when agent tries to run commands - #3 by deanrie

If it doesn’t help, I’ll need a bit more info:

  • Console logs: Cmd + Shift + P > Developer: Toggle Developer Tools > Console tab (screenshot or error text)
  • Which shell you’re using (echo $SHELL in the terminal)
  • Request ID (chat menu → Copy Request ID)

Let me know how it goes.