Bug Report: Agent Task Stuck After Approval + Terminal Not Working Across Projects

After approving an agent task that runs terminal commands, the task gets stuck indefinitely. The UI shows the task as running, but it never completes.

Steps to Reproduce

  1. Start an agent task that runs terminal commands.

  2. Approve the command execution.

  3. The task begins running.

  4. It never completes and remains visible in the UI.

Observed Behavior

  • The approved task remains stuck in “Agent is running terminal commands.”

  • Spinner continues indefinitely.

  • Another task appears as “pending” but:

    • Cannot be stopped.

    • No visibility into what it is executing.

  • When opening a new task or even a different project, terminal commands do not execute.

  • The terminal panel stays visible forever with no output or completion.

Expected Behavior

  • Approved terminal commands should execute and complete normally.

  • Pending tasks should be cancellable.

  • Terminal execution should work independently per project/session.

  • No global blocking caused by an earlier task.

Additional Notes

  • It appears that a previously started task may still be running in the background and blocking new executions. (not sure)

  • There is no visible way to purge, kill, or reset stuck tasks.

  • Restarting the UI does not resolve the issue.

Questions

  1. Is there a known issue with stuck background agent processes?

  2. Is there a way to purge or kill all running/pending tasks?

  3. Is there a way to fully reset the agent runtime environment?

me too is bug ? how to fix ?

I tweaked it by adding a rule for the agent to use cmd /K before executing commands, for example, cmd /K pip list and it worked well. The terminal in the chat history no longer freezes, although the background terminal process still gets stuck. Just ignore it and close it manually.

This behavior is new in the last couple of days. never had it before the recent update. Now pretty much every other command execution gets stuck and the agent just sits there waiting for it to finish.