Your agent read the code. It still missed the running program.
Suppose you ask a coding agent why a chart is empty. It reads the Python script, starts a fresh process, and finds no obvious problem. Meanwhile, your open console contains a filtered dataframe that the script never saves. The chart you are looking at belongs to that session, not to the clean run the agent just performed.
Nobody has to be careless for this to happen. The agent and the developer can both be looking at the right project while looking at different programs in motion. I find that distinction easy to lose when an agent can read files and run commands: the presence of a terminal feels like access to reality. It is access to a runtime, which may be the wrong one.
The file is not the session
A repository tells an agent what could run. The current session tells it what is running: which interpreter the IDE selected, which packages are available there, which objects have changed since the last run, and what the app or plot viewer currently shows. A new shell may select another environment. Even with the same environment, it will not inherit objects you created interactively.
This matters most when the problem exists only after a sequence of actions. Maybe you loaded a table, filtered it in the console, changed a variable, and refreshed the plot without rerunning the script. A file-based diagnosis may be perfectly consistent with the saved code and still fail to explain the blank chart. Before changing a line, I would want to know which session produced the result and whether the agent's reproduction used it.
The temptation is to ask the agent to rerun everything and call the new result a reproduction. Sometimes that is exactly what you want. Here it can erase the condition you are trying to explain. Positron users were experimenting with ways to expose live Python and R sessions to external agents before the IDE gained a built-in integration; those are separate implementations of the same concern.
Two doors into the workbench
Positron describes two related integrations, with different boundaries. Its in-IDE Posit Assistant, in preview, can use IDE context such as the selected interpreter, installed packages, connections, and app information. A subsequent Posit article describes deeper Assistant interactions with the console and the IDE's view of package installation. For Assistant actions, the article also describes approval prompts or project-level auto-approval; Ask mode does not make commands available.
Separately, Positron's experimental built-in MCP server can give external agents selected access to live Python and R sessions. The release describes tools for console actions, object inspection, plots, and commands, enabled through an experimental setting. Agent-run console code is labelled, which can help a developer distinguish it from their own input. This is not a claim that an arbitrary external MCP client gets the same context or approval behavior as Posit Assistant. The two integrations address the same missing-state problem without being the same interface.
A visible label is useful, but it is not an audit of the reasoning that led to a command. An approval prompt establishes a moment for a person to decide whether to allow an Assistant action. It does not establish that the agent picked the right environment or that the action will fix the chart. Visibility, authority, and correctness need separate checks.
Diagnose the state you intend to change
For the empty-chart example, I would start with a small comparison. Name the active session and interpreter. Inspect the dataframe that feeds the chart, along with the package or connection state relevant to that specific failure. Then compare those observations with what a fresh run of the saved script produces. If the rows disappeared only in the interactive session, editing the plotting function would be a strange first move.
Only after identifying the difference would I authorize a narrow action: perhaps rerun the transformation against a copy of the in-session object, or change the filter in the saved code and rerun the chart. Keep the agent's console actions distinguishable, and check the resulting object and visible plot yourself. If the fix depends on an interactive mutation, decide whether to put it in a script or test. Otherwise the next session will lose it, and the agent may rediscover the same mystery.
Live-session tools do not make the investigation safe by themselves. An external agent may have access to only some tools. The object you inspected can change before the next command runs, and a chart that renders can still tell the wrong statistical story. Inspect the state the developer means, then check what the action changed. If either part is missing, a tidy agent summary will not fill it in.
There is another kind of context worth separating here. Today's interpreter objects will disappear; an agent's retained project memory might outlive this session and become stale in a different way. It may be worth recording that the chart depends on a filtering step, but not treating today's dataframe as a permanent project fact. The distinction keeps a debugging observation from quietly becoming an instruction for tomorrow.
When an agent reports that it ran the code, ask which session it used. Ask what it inspected and what changed in the program you already had open. You will still need to judge the result, but at least you will be judging the same run.
Source notes
- Positron October Release Highlights — first-party description of the Assistant preview and the distinct experimental built-in MCP live-session integration.
- A deeper Positron integration for Posit Assistant — first-party detail on IDE context, console interactions, package/environment view, and Assistant-specific approval and Ask-mode boundaries.
- Experiment: exposing Positron's live R/Python sessions to Codex and other agents via MCP — practitioner discussion of live-session versus separate-process context before the built-in release; not evidence that the experiment became the released server.
Comments
Post a Comment