Where Did This Come From, and Why? Giving Agents the Computation and Intent Behind Every Output with marimo-lens
Gyarmati et al. in Agents
Your agent sees a chart. Can it find the code and why?
Where Did This Come From, and Why? Giving Agents the Computation and Intent Behind Every Output with marimo-lens
A compliant edit can erase an earlier decision
Ana points at 2012, far above the trend, and asks for a fit across all years.
Ben had asked to exclude 2012 as an outlier. The filter records the exclusion, not his reason.
Without linked history, compliance can silently undo Ben's work.
The output and its history split apart

Public Observable sample: 7,293 notebooks with histories; 17,328 comments used as request proxies. 60% of chart comments targeted the view; 86% of charts relied on other cells; 52% of dated output-feeding undos happened upstream.
A pointer needs both computation and intent

The Lens graph links view, computation and intent. A selection reaches its producer, upstream blocks and linked requests: the graph cut sent to agents. This paper implements it as marimo-lens for marimo.
From a pointed output to useful agent context
- 1
Select a part
Point at a chart region or report value; Lens anchors the selection to an output.
- 2
Trace upstream
It follows the producing block and upstream dependencies.
- 3
Link earlier intent
Earlier requests attach to changed blocks with their asker and wording.
- 4
Point back
Agents mark the view, show a trail and report status/standing; hosts need stable output IDs, dependencies, an edit stream and an agent channel.
Present code does not mean still wanted
Lens derives present, reverted or unknown from the current cell implementation.
Only a person sets confirmed, withdrawn or unset. A change can be present but unwanted, or reverted yet still wanted.
Check both before deciding whether to reverse earlier work.
A pointer helps agents find the producing cell

Tiles aggregate three runs per request/input/agent. On 22 real requests, producing-cell identification rose from 39% (question alone; 95% interval 24–56) to 99% with Lens (97–100).
Text-only agents found more with fewer tokens
Median input per run was 524k tokens for Beam 1.0 and 622k for GLM-5.3.
Their medians fell to 293k and 205k, respectively; cell-finding rose from 40% to 98%.
Token comparisons are within each agent.
Intent needs a record, not just notebook history

Across four agents, Lens reported requester and wording in 95% of runs (95% interval 89–99) on 13 outputs with earlier requests. Figure 7 compares image-reading agents; comment rows are Experiment 1, other rows Experiment 2.
A policy helps, but some reversals remain
Exp. 3: 10 outputs, 7 earlier requests; 120 runs per input/condition. Controls should not stop; 95% intervals are over requests.
What these tests cannot settle
Reconstructed requests
Real requests came from three public notebooks by two teams; records were rebuilt from older comment threads and histories.
One harness, one turn
All agents ran in Claude Code; the conflict experiment covered one turn, not how a team responds to an agent's question.
Imperfect provenance
In-place mutations may hide dependencies; comparison flips can hide undos, while reworded prose can look reverted.
Why it matters
- A pointed output is only half the context; the computation and the reasons behind it can change what a safe edit means.
- Record each asker, request and changed cells; for a present, unset request, ask before reversing if the new request omits its asker.
- How analysts use these trails and receipts in everyday work remains open beyond one-turn tests and early public use.
1 like 12 slides, 3 min
1 day ago