How to work with an agent's files and terminal
This guide shows how to look at what an agent produced, change its instructions, delete a file, and run commands in its folder. It assumes Sidekicks runs with a configuration that has agents.
Open an agent's workspace
- In the Agents panel, hover the agent and click 📂.
- The centre shows the agent: its state, where it runs (
local · /pathorcontainer name · /path), the channels it belongs to, and the tabs Files, Terminal, Log. - 💬 Conversation goes back to the direct conversation; clicking a channel leaves the workspace too.
Read and change a file
- In Files, click a folder to open it, a file to read it. Dot files (
.git,.mm…) andnode_modulesare hidden: tick Show hidden files to see them. - Edit the text. ● modified appears; Save (or ⌘S) writes the file, Revert brings back what is on disk.
Source code is coloured according to its language, told by the extension or the name of the file: Go, JavaScript and TypeScript (with JSX), Python, Rust, Java, C and C++, C#, Kotlin, Swift, Ruby, PHP, Lua, SQL, shell scripts andMakefile,Dockerfile, HTML, CSS, XML, YAML, JSON, TOML,.envand.inifiles, diffs, PowerShell. Any other file, and a file larger than 512 KB, stays plain text. - If the agent changes the file while you edit it, a banner says so: Take their version reloads it (your changes are lost), Keep mine saves yours over it.
To find a file or a folder in the Finder (macOS), the Explorer (Windows) or the file manager (Linux), hover it in the tree and click 📂, or click 📂 Show where it is above the open file. The button shows only when the agent's folder is on this computer: an agent on this computer, or in a container or sandbox whose folder is mounted from here.
The tree and the open file follow the agent's changes by themselves: a file it creates appears within a second (two in a container).
Preview a document or an image
Markdown (.md), AsciiDoc (.adoc, .asciidoc, .asc) and HTML (.html, .htm) files open on their Preview; Edit shows the text, Preview comes back to the rendering of what is in the editor. Images (.png, .jpg, .gif, .webp, .svg…) only have a preview: click the image for its actual size, again to fit it.
- Images and links relative to the document are looked for in the agent's folder: a link to another file opens it here, a link to a site opens the browser.
- An HTML page is shown in a frame that runs no script and reaches nothing: its images and style sheets of the folder are put inside it, its links do nothing.
- The preview follows the agent's changes, like the editor.
Open a file an agent links to in its answer
When an agent writes a document and gives a link to it in its answer, click the link: the file opens in a panel at the right of the conversation, which stays in view.
- The panel previews Markdown, AsciiDoc, HTML and images as above, and shows any other text file as is. Links of the document to other files of the folder open in the same panel.
- 📂 Show where it is opens the Finder (macOS) or the Explorer (Windows) with the file selected. It shows only when the agent's folder is on this computer: an agent on this computer, or in a container or sandbox whose folder is mounted from here.
- Open in the agent's files shows the file in the Files tab, to change it. ↻ reads it again after the agent changed it.
- × or Escape closes the panel; drag its left edge to resize it.
- Each channel and direct conversation has its own panel: it is hidden when you go to another one, and shows again when you come back, unless you closed it.
The link must lead to a file of the agent's folder: a path relative to the folder (notes/plan.md), an absolute path inside it (as the agent or this computer sees it), or a file:// address of such a path. A link to a site opens the browser; any other link shows why the file cannot be shown, and nothing outside the folder is read. To get links that open, tell the agent in its AGENTS.md, e.g. "When you write a file, give a Markdown link to it, relative to your folder".
Create, rename, move or delete files
- Create: select a folder (or a file in it), click + New file (or + New folder), type a name, Enter. A new file opens, empty.
- Select several entries: ⌘-click (Ctrl-click on Windows and Linux) adds an entry to the selection or takes it out; ⇧-click selects every row up to it; ⌘A (Ctrl+A) selects every row shown. The actions below then apply to the whole selection.
- Rename: hover the entry and click ✏️, double-click it, or select it and press F2. Type the new name, Enter (Escape cancels). An open file follows its new name, even with unsaved changes.
- Move: drag entries onto a folder (or onto a file, to go next to it; below the rows for the top of the folder). Without the mouse, right-click → Move to… and type the folder (empty for the top). A folder never goes inside itself, and nothing replaces an entry that already has the name.
- Duplicate: right-click → Duplicate, or select and press ⌘D (Ctrl+D). The copy goes next to the original, with
-copybefore the extension (plan.md→plan-copy.md, thenplan-copy-2.md…); a folder is copied with its content. A protected file can be duplicated, and its copy is not protected — unless it lands in a protected folder, which is refused. - Right-click an entry for a menu with all these actions, and Show where it is.
- Delete: hover the entry and click 🗑 (or Delete under the editor, or press Delete — ⌘⌫ on a Mac — in the tree), then confirm; with several entries selected, one confirmation covers them all. On this computer the file goes to the trash — restore it from the Finder if needed. In a container the deletion is final, and the confirmation says so.
Protect files
Some files must not be changed or deleted by mistake. Without writing anything, the agent's instructions (AGENTS.md), its skills (skills/ and all it holds), its configuration file (after --config or serve acp in its args) and, for an agent in a container or a sandbox, the files it is built from (compose.yaml, Dockerfile, sbxenv.yaml named by its runtime.lifecycle) are protected. To protect others, list them under the agent in Settings:
- name: milo
protect: [notes/plan.md, "prompts/**"]
A protected file shows 🔒 instead of ✏️ and 🗑 and opens read only; it can be neither renamed nor moved, and a folder holding one can be neither deleted nor moved. When one of several selected entries is protected, nothing is deleted. Only the configuration lifts a protection (the ones always applied cannot be lifted): the interface never does. The agent, the terminal and the Finder can still change these files.
Run commands in the agent's folder
Click Terminal: a shell opens in the agent's folder — yours on this computer, bash or sh inside a container. Full-screen programs (vim, htop) work and follow the size of the panel. When the shell ends (exit), Open a new shell starts another one.
- Several terminals: + next to the terminals opens another one (8 at most per agent), named Terminal 1, Terminal 2…; click a name to show it. × closes a terminal: its shell ends, with everything it started; the others go on.
- They keep running: go to Files, a conversation, a channel or another agent — the terminals go on, with what runs in them, and what they print meanwhile is kept. Coming back to the agent shows its terminals as they are. The Terminal tab shows how many are running, and the agent's row in the Agents panel shows ⌨ 2.
- A terminal ends only when you close it, when its shell exits, when another configuration file is opened, or when Sidekicks quits.
Read the agent's log
Log shows the last lines the agent wrote on its standard error — what explains an error without opening a terminal.
Variants
- Agent in a container: see How to run an agent in a Docker container.
- Agent in an
sbxsandbox: see How to run an agent in an sbx sandbox; each file action takes a second or two.
See also
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
|