Files and Second Brain
Edit Markdown notes in a TipTap workspace confined with Go os.Root, detect external edits, and browse files on paired Loom nodes.
The Files page gives you a direct editor over your Second Brain folder—the local directory where you and your coding agents keep Markdown notes, plans, and references. By default it uses SECOND_BRAIN_DIR (~/second-brain), changeable directly from the page or Settings.
Formatted TipTap editor and conflict safety
- Rich Markdown editing:
.mdfiles open in a vendored TipTap rich-text editor with a floating toolbar (headings, bold, italic, strikethrough, inline code, links, lists, checklists, quotes, dividers, tables, local images, undo) and a/slash menu for inserting blocks. Other text files open as plain text (up to2 MiB), and images render inline. - Autosave with conflict detection: Edits save automatically and send the file's original
modifiedtimestamp (POST /api/files/write). If an agent or external editor modified the file on disk in the meantime, Loom returns409and asks whether to reload or keep your version instead of silently overwriting. - External change markers: Files changed outside the editor during the last 24 hours are flagged in the folder tree.
- Safe deletion: Deleting an entry (
POST /api/files/op) moves it to.trashinside the workspace rather than permanently removing it. - Tree hygiene: Dotfiles and
node_modulesstay hidden, and up to5,000entries load cleanly. Images load only from inside the folder—external image URLs are never fetched.
os.Root confinement boundary
Every Second Brain file request passes through Go's os.Root API relative to the configured workspace directory:
- Absolute paths,
..traversal, hidden path segments, and symlinks resolving outside the folder are rejected at the filesystem layer. - Newly created notes and directories receive owner-only permissions.
- Every write route requires
POSTbehind Loom's session authentication and Go same-origin protection.
Discussions can save any reply directly into your Second Brain folder, while keeping automatic prompt injection strictly opt-in—moving a discussion into a sidebar folder never sends your files to a model.
Browsing files on paired nodes
When you switch to machine scope (scope=machine), Loom lets you inspect, edit, and manage directories on the local host or any paired Linux node by its saved machine ID:
- On Unix hosts, machine scope starts at
/with the service account's filesystem permissions; on Windows it starts at the account home directory. - Requests to a paired node travel directly over its authenticated machine Bearer link without requiring SSH.
- Disabling a node's
terminalmodule (loom node init --no-terminal) also disables remote file browsing and workspace creation on that node.
Files HTTP routes
| Route | Purpose |
|---|---|
GET/POST /api/files/root | Read or update the active Second Brain root ({path, create}) |
GET /api/files/tree | Folder tree with sizes, timestamps, and outside-change markers |
GET /api/files/list?path= | List a single directory in the active scope |
GET /api/files/read?path= | Read UTF-8 text content (up to 2 MiB) |
GET /api/files/raw?path= | Serve image bytes or download other file types as attachments |
POST /api/files/write | Save {path, content, modified, create} (409 on concurrent disk change) |
POST /api/files/op | Create folder, rename, move, or trash (mkdir, rename, delete) |
Continue with Machines and Nodes to pair additional hosts.
Codeman Agents
Connect a local or remote Codeman server to launch and supervise Claude Code, Codex, OpenCode, and Pi sessions with WebGL terminals and schedules.
Machines and Nodes
Distribute local AI, voice, terminals, files, and host metrics across machines with Loom Node on port 2511 and SSH fallback.