* feat(workbench): one project side by side, on one screen or two A project's session and Loki as columns of one window, and its site in a window of its own — beside this one or on the other screen. Nothing in it is new UI: the columns are TerminalSurface and LokiWorkspace mounted as they are; the site is the live page with the owner's pass, where pointing and "Fix it now" already live. What the workbench adds is the arrangement. - /projects/[id]/workbench, a Workbench row on the project page, and the pane SSOT in config/workbench.ts (session, loki). - The site is a window, not a pane, on purpose: every fleet site sends frame-ancestors 'none' and Cross-Origin-Opener-Policy same-origin, so it can be neither framed nor reached as an opener. The workbench says only what it knows. docs/architecture/workbench.md. - Windows open the best way the platform offers: Fleet Runner places them from the real display list (new IPC open-workbench-window, v0.8.60, caller tiled left / new window right, or the other display whole, an open window brought forward); a Chromium browser places a popup on the other screen once allowed; any browser gets a half-screen popup. - Any pane in its own window (?pane=): a solo window hides the shell chrome at every width; the windows of one project on one machine keep each other honest over a BroadcastChannel (a popped-out pane leaves its window and returns when that window closes). - Which panes a window shows is device-local (localStorage per project), never a column on the project. Two columns from xl; below that one pane at a time and the strip chooses; below md the phone's rows. - Each column's side rail (the session's Loki rail, the chat's history) is remembered for the workbench apart from its own page and starts closed in a column: TerminalSurface gets `rail`, LokiWorkspace gets `basePath`, `project` and `history`. - Full screen is the browser's own, on the workbench root. - Pure parts tested: scripts/test/workbench-layout.ts, workbench-windows.ts, workbench-placement.ts. Checked by hand at 390, 720, 1000, 1440 and 1920px and as a one-pane window at 900px, no horizontal scroll. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmswy1H6cYyL3hmLRy9 * refactor(workbench): one placement rule, a window's own layout, honest re-opens A second pass over the workbench after an independent review of the diff. - One placement module for both sides: src/lib/workbench/placement.ts is the pure rule the browser popup and Fleet Runner's real windows share (the desktop copy is gone). Tiling respects the caller's minimum width, so the 800px shell and the new window meet on a 1440px display instead of overlapping; only a display too small for both overlaps. - The layout is the window's: sessionStorage per project, kept across the window's reloads and never shared. Two full workbench windows of one project each keep their own arrangement; localStorage's cross-window storage event clobbered them. useLocalStorageState takes the area. - A popped-out pane announces itself closed on every way out — pagehide and a soft navigation away — and open again from the back-forward cache. - A window already open is brought forward, never navigated again: the site's address carries a pass minted per visit, and a second navigation left it unread in the address bar. Fleet Runner keys windows by the URL without its fragment, restores a minimized one and places it where the person now asks. - The screen-management prompt is raised when "On the other screen" is chosen, not on the open that follows: a click that waits for a prompt goes stale and the browser refuses the window. - Close in a solo window leads somewhere even when window.close() is a no-op (a typed address): it falls through to the whole workbench. - The dock click on macOS asks whether the SHELL window exists, not any window, so a site window open with the shell closed no longer hides it. - Which panes are on screen (columns, or one of them) is a pure, tested rule; window opening lives in one hook (use-workbench-windows) instead of two states; the phone's rows read each pane's surface from the registry; useBodyClass serves both the immersive chat and the solo window. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmswy1H6cYyL3hmLRy9 * feat(workbench): one box — Session and Watch, not Session and Loki The first cut put Loki's chat in the second column. Beside the session's box that was a second place to type on one screen, and a person had to work out which box did what ("I see two chats, and it just gets confusing"). The session's box already does the one thing the screen is for — it types into the live agent, or starts one — and the session already offers Loki about itself ("What's going on?"). - The second column is Watch: the project's run as a live thread (what you asked, Loki narrating, the agent's screen, and where the change is — pull request, tested and merged, live), mounted from ProjectWatch as it is. It has no box. Loki's chat stays its own page. - The pane registry carries where each pane's own page is (`pageHref`), so the phone's rows and the columns read one list. - A pane body can be a scrolling thread (Watch) or a surface that fills the pane (the session). - LokiWorkspace is back to what it was: the host-path, project and history props it only grew for the workbench are gone with their only caller. - The project row says what the screen is for: "Say what to change and watch it happen, with the site beside". Checked by hand at 390, 720, 1000, 1440 and 1920px and in both solo windows: no horizontal scroll, no console errors. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmswy1H6cYyL3hmLRy9 * feat(workbench): one screen, one box — the site as Loki sees it, the robot, one line of state "If a user sees tons of options, they can feel a paralysis" (owner, 2026-10-31). The screen showed about twenty controls: the Sessions page's builder picker, tab strip, agent and view switches, Watch's card with its own buttons, pane toggles, a window-placement menu. One thing to do, a few things to see — so: - The site, left, as Loki's own browser sees it (WorkbenchSiteView): the review worker already walks the site in a headless Chromium on the box and keeps one frame per action with the action named. While it walks, this shows the robot using the site, frame by frame — the one thing no window of yours can show; at rest, the last look. A tap opens the real site in its own window, where the person uses it and the widget does the watching. Fleet sites forbid framing and sever window.opener, so a picture of Loki's browser is what can honestly be shown inside Loki. - The robot, right: TerminalSurface in a new quiet shape (`quiet`) — no builder picker (which builder runs a project is a stored decision), no tab strip of other projects, no shell rows; the chat | terminal switch and the agent stay. Its box is the ONE box on the screen. - One line of state over the robot (WorkbenchStateLine): the sentence the Watch track composes, a dot for its tone, "Watch it work" for the whole story. Pure stateLine() in lib/workbench/state-line.ts, tested. The Watch column is gone from the screen. - One "⋯" for the rest: the robot in its own window / on the other screen, the site on the other screen, full screen. The pane toggles and the placement menu are gone; a placement named for one opening wins and becomes the remembered one. - The pane registry is the robot alone; the site is a region. Below xl the robot alone (the site is in its own window anyway). On a phone: the site, the robot, Watch it work, as rows. - TerminalSurface stayed under the function-size ceiling by lifting the builder-picker wrapper and the resume filter out of it. Checked by hand at 390, 720, 1440 and 1920px and in the solo window: no horizontal scroll, no console errors. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmswy1H6cYyL3hmLRy9 * feat(workbench): a focus screen — the app's chrome leaves while you build Three layers of navigation sat around two columns: the sidebar's twenty destinations, the project strip ("Profile · Chat · Home · Sessions"), then the workbench's own header and the robot's bar with the Sessions page's agent menu — "Frankenstein elements just thrown together" (owner, 2026-11-01). - While the workbench is open, the sidebar, top bar, bottom tabs, footer and project strip are gone (body.fc-workbench-focus, the former solo rule applied to the whole screen from md up). They are for moving between pages, and a person here is not moving. The one back link in the header is the way out. A phone keeps its own bars: the rows need them. - The robot's bar is the chat | terminal switch alone (TerminalSessionBar `agentSwitch`, off in the quiet shape): the session's own chip names the agent and its box changes it. What is on the screen now, left to right: back, Open the site, "⋯"; the site as Loki sees it; the robot with one line of state, the view switch and the one box. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmswy1H6cYyL3hmLRy9 * feat(workbench): two windows of one desk — one frame, a title bar each The site sat in a card and the robot stood bare beside it, with a line of state floating above and a caption floating below: two different things on one screen. Now both regions, and a solo window, are one frame (WorkbenchFrame): a title bar — a dot for its tone, one sentence, one link — over a body. - The site's bar is its address and what Loki is doing there ("Live", "Loki is using it: …", "Loki's last look: …"), like a browser's own tab; its body the page, top-aligned; before any look, the address alone and "Tap to open" — never a sentence apologising for an empty box. - The robot's bar is the build's state (hooks/use-run-state, the Watch track's sentence) with "Watch it work"; its body the session with the one box. WorkbenchStateLine is folded into it. - The floating Ask Loki button leaves in focus: its panel is the second chat this screen deliberately has not, and it sat on the send arrow. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmswy1H6cYyL3hmLRy9 * feat(nav): Loki first — the chat is the default screen, three words then folds The owner's philosophy, 2026-11-01, now in AGENTS.md ("Why Loki exists, and for whom"): a good Loki chat, reachable in one step, is the screen that opens; the rest of the app one tap away; a friend on your side, not a staff; never a screen that makes a person feel stupid; measure by effort, not features. - APP_HOME and RUNNER_HOME are /loki: signing in, and Fleet Runner starting with the computer, land on the chat. They landed on Today, a page to read before a person could say anything. - The sidebar is three bare words — Loki, Home, Projects — the same three as the phone's bottom bar (Loki first there too), then folded groups that each say the question they answer: Waiting for you (Approvals, Feedback), Your day (Today, Suggestions, Voice), Across your projects (Sessions, Missions, Activity, Prompts), Under the hood (Packages, System), and Private behind the PIN. Not a drawer called More: the navigation test records why a "More" section rots, and still forbids it; the phone's More is the folded groups as a sheet. - Every sidebar line says what it is for on hover (the item's own description), so nothing has to be guessed. - SidebarSection gains `bare` (no header, never folded) and `foldedByDefault`; the tests that pinned the old Build / Loki / To review / The fleet placement now pin the new homes. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmswy1H6cYyL3hmLRy9 * feat(voice): Loki speaks as someone on your side The owner's philosophy (AGENTS.md, "Why Loki exists"): a friend on your side, not a staff you direct; never a word that makes a person feel stupid. The public pages still said the opposite. - Hero: "Say what you want. Loki builds it with you." (was "Describe it. Agents build it."). The lede, APP_DESCRIPTION, the social-card tagline and the how-it-works steps follow. Every factual claim is one the product keeps: it builds with AI agents, puts it online, changes it on ask. - /why's principles open with two new ones from the owner's words: "On your side" and "Life is short". Commitments about how Loki is made, not claims about what it does. - The new-project card says "Say what you want. Loki sets it up and starts building." instead of repos and agents; the sidebar's Loki line drops "dispatch" for "Loki answers, or builds it with you". - The hero's two sentences are separate balanced blocks: on a phone each breaks as an even pair, never one word alone. The mission headline on /why ("Direct the creation of …") is left for the owner to decide. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmswy1H6cYyL3hmLRy9 * feat(voice): the mission reads "with someone on your side" /why's headline was "Direct the creation of everything you can imagine." — the staff-you-manage voice the owner set aside. It now reads "Make everything you can imagine, with someone on your side.", the owner's own call (2026-11-01). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmswy1H6cYyL3hmLRy9 --------- Co-authored-by: Claude <noreply@anthropic.com>
Fleet Runner Desktop (for Loki)
This is the native desktop application — the local runtime for Loki on the user's own machine (the "local fleet runner"). It is optional: cloud is the default builder, and a project runs here only when its stored routing decision says so ("Runs on" in Control → project profile, or a laptop-only checkout).
The shipped design is documented in docs/architecture/box-owned-pty-executor.md
and docs/development/cloud-local-workflows.md. docs/desktop-app.md and
docs/archive/fleet-runner-pty-ownership.md are the historical decision records.
Current status
- Packaged native app (AppImage + .deb produced via electron-builder;
macOS/Windows builds via
.github/workflows/desktop-release.yml). - Ships in web-shell mode: the main window loads
https://loki.orangecat.chdirectly and the user gets the exact same React tree the browser serves, plus native bits (tray, OS notifications on agent idle, persistent NextAuth cookies). One UI, two surfaces. - Native IPC remains available via the preload-injected
window.fleetRunnerbridge — the web app detects Fleet Runner via theFleetRunner/<version>UA suffix and calls into the local runtime where it makes sense. - Owns every agent PTY. A dispatch claimed from
pending_commandsspawns the agent CLI in a node-pty PTY inside the runner's own process tree (src/main/pty-runtime.ts, the same core the headless box runner uses) and writes the prompt there. An inject for a project with no live owned PTY fails loudly ("no running agent for … — dispatch to start one") and the cloud enqueues a dispatch instead. There is no multiplexer: no zellij binary is bundled, noLOKI_RUNNER_PTYswitch exists. - No tab focus, no restore.
focus_tabis retired (the runner rejects it; watch the agent in the web terminal). There is no cold-start restore on boot and no Settings "Restoration" section — an agent runs while its PTY runs. - Agent installers ("Install X" on Control) run in an owned PTY watchable in the web terminal. Peek reads the owned PTY buffer; the "This computer" terminal streams it live and accepts keystrokes.
- Real
home/integration in the main process: loads your projects config from agent-projects.conf, usesdecide(), renders prompts via the orchestration layer (renderTaskForAdapter) on every dispatch. - The embedded
home/watcherreacts to~/.loki/sessions/*.mdchanges and fires a native OS notification on everyworker.idleevent — fire-and-walk-away UX.
Overriding the shell URL
# Point the desktop at the hosted production app (default)
LOKI_WEB_URL=https://loki.orangecat.ch ./Fleet-Runner-*.AppImage
# Or against a local dev server
LOKI_WEB_URL=http://localhost:3000 ./Fleet-Runner-*.AppImage
Get the runnable app
End users should grab a signed installer from the download page. For a local build from source:
git clone https://github.com/bitbaum/loki.git
cd loki/desktop
npm install
npm run dist:linux # or dist:mac / dist:win on those platforms
Then run:
chmod +x dist/Fleet-Runner-*.AppImage
./dist/Fleet-Runner-*.AppImage
(Or install the .deb / .dmg / .exe.)
On launch, the app loads the Loki control plane directly. Sign in with
the same account you use on the web; native APIs are injected via
window.fleetRunner, and the embedded watcher fires native notifications when
local agents go idle.
Dev (for contributors)
cd desktop
npm install
npm run dev
Packaging
npm run dist # current platform
npm run dist:linux # AppImage + deb
# etc.
Cutting a release
.github/workflows/desktop-release.yml builds Fleet Runner for macOS, Windows,
and Linux from one tag push and uploads the signed installers to a GitHub
Release. To cut a release:
cd desktop
npm version patch # or minor/major — bumps package.json + creates a commit
git tag fleet-runner-v$(node -p "require('./package.json').version")
git push --follow-tags
The workflow takes ~10 minutes. Once it's green, the binaries are at:
https://github.com/bitbaum/loki-releases/releases/latest/download/Fleet-Runner-linux-x86_64.AppImagehttps://github.com/bitbaum/loki-releases/releases/latest/download/Fleet-Runner-linux-amd64.debhttps://github.com/bitbaum/loki-releases/releases/latest/download/Fleet-Runner-mac-x64.dmghttps://github.com/bitbaum/loki-releases/releases/latest/download/Fleet-Runner-mac-arm64.dmghttps://github.com/bitbaum/loki-releases/releases/latest/download/Fleet-Runner-win-x64.exe
To test the workflow without minting a real release, dispatch it manually from
the Actions tab with dry_run: true — it builds on all three runners but
skips the publish step.
Relation to existing code
- Builds on the
home/pure pieces (state, decide, render, watcher) and the shared executor insrc/lib/agent-execution/. - The headless box runner (
scripts/box-runner.ts,loki-box-runner.serviceon Hetzner) reuses this runner core without Electron; it is the default builder.
See the root
content/thoughts/the-local-fleet-runner-and-remote-control-plane-architecture.md
for the strategic "why".