My middle aged memory might be failing me, but I’m sure that earlier Cursor versions offered a view in which one could see and interact with the terminal associated with a specific agent window.
I have multiple agent window tabs open, but only see a single bash terminal through Cursor. This terminal has data (bash environment variables) whose values are inconsistent with the values the agent is reporting.
This is probably a basic thing in Cursor that I should know already, but any guidance would be useful – how can I see (and ideally interact) with the same terminal session as the agent?
I see that Terminal → New Terminal opens a new terminal and a tabbed interface in the terminal window sidebar, but how are these terminals mapped to agent sessions (current and future)?
Why the env looks different: the terminals you open (Terminal → New Terminal) are yours, and the agent doesn’t run its commands in them. By default each agent chat runs its commands in its own separate shell session, so the environment can differ from any terminal you open. That difference is expected, not something you misconfigured.
How they map to agent sessions: they don’t - the terminals you open aren’t tied to a chat. The one place agent-owned terminals do show up is long-running/background commands (like a dev server) the agent starts: those appear in your terminal panel as real terminals you can jump into. The terminal list (the list icon at the top-right of the terminal tab) shows terminals started by other chats/agents, so you can find the right one.
If you want to see and type into the same shell the agent uses: turn on Legacy Terminal Tool - Cursor Settings, then search “Legacy Terminal Tool” (it lives under Agents → Terminal and Editing). With it on, agent commands run in normal, interactive terminal instances in the same shell, so you can jump in and fix things (a venv, an env var, etc.) directly. One caveat: it’s the older terminal tool.
The direct per-chat “open this agent’s terminal in a pane” view isn’t in the current layout. We’ve let the team know, and making the default agent terminals interactive is something we’re tracking - I’ll pass your report along as another signal.