> For the complete documentation index, see [llms.txt](https://docs.upriverdata.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.upriverdata.com/product-usage/agent/code.md).

# Code

Review, edit and diff the files the agent works with.

The Code tab of the [helper drawer](/product-usage/agent.md#the-helper-drawer) shows the files the agent has read or modified during the current task, so every change it makes to your pipelines stays fully transparent and in your control.

<figure><img src="https://875415170-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLE0zsJmUpeLjYw085cnO%2Fuploads%2Fgit-blob-4a04452c67dc7f14c2fe7fba8fb5ea92c41b6704%2Fimage%20(agent-code).png?alt=media" alt=""><figcaption><p>Code tab showing a file diff produced by the agent</p></figcaption></figure>

## File tree

On the left, a file tree lists the files in the agent's working repository. The tree can be collapsed or expanded using the controls above it. Selecting a file opens it on the right.

## Viewing changes

If the agent modified the selected file, it's shown as a **diff view** with syntax highlighting, so you can quickly see exactly what changed. If a file hasn't been touched, it's shown as regular read-only code.

A small toolbar above the file lets you:

* **Copy code** — copy the full file contents to your clipboard.
* **Edit file** (pencil icon) — switch to an editable version of the file. While editing, `Cancel` and `Save changes` buttons appear; if you try to leave with unsaved edits, you'll be asked to confirm discarding them.
* For Markdown files, toggle between **Preview** and **Code** mode (magnifier icon) to switch between the rendered Markdown and the raw source.

{% hint style="info" %}
When viewing a shared or read-only task, editing is disabled and only the Copy button is available.
{% endhint %}

## Discovery plans

Files named like `plan-task-*.md` are discovery/plan files the agent generates before doing larger pieces of work. Instead of the usual edit controls, these show an **Execute** button, which approves the plan and lets the agent proceed with it.
