Skip to content

Machines are saved by OpenAgent, and a run names its project - #2053

Merged
suleimansh merged 1 commit into
mainfrom
machines-file
Oct 10, 2026
Merged

suleimansh merged 1 commit into
mainfrom
machines-file

Conversation

@suleimansh

Copy link
Copy Markdown
Member

The first step of the self-hosting plan (#1824): the core.

👤

  • A machine I save shows in every browser on this computer. Before, each browser had its own list.
  • A run I send to another machine starts in the same project there. Before, it started in whatever folder OpenAgent was started in on that machine.
  • If the other machine does not have the project, nothing starts, and I am told which project to add there.
  • A project with no GitHub address runs on this machine only.
  • On screen, a computer that runs agents is a "machine". "Device" is kept for a phone or a browser. This word may change later.

🤖 automated · Opus 5.5, effort high

What a person sees

  • Settings has a "Machines" section, and the "Run on" menu says "Add a machine…".
  • Machines saved before this change are gone once. Add them again. No code carries them over.
  • A project the other machine does not have: "shop is not on Studio. Add it there first."
  • A project with no repository address: its machines are greyed out in "Run on", with the reason under them.

How

  • The list is in the home file (~/.openagent.json), which only its owner can read. A machine's key is in no answer to the browser.
  • Four calls from the browser: list, add, remove, and which machines answer.
  • A Start names a saved machine by its id. The daemon looks up the key.
  • A project is named across machines by the address its repository was cloned from, like github.com/acme/shop. SSH and HTTPS clones read the same.
  • The other machine starts the run, streams it and serves its buttons in its own project cloned from that address. With two such folders it takes the first on its list. There is no project it falls back to.

Picks of mine

  • The list goes in the same home file as the projects and the settings.
  • An address is read without its user, port, .git ending and letter case. Known limit: a host that serves SSH and HTTPS under two names (ssh.github.com, Azure DevOps) reads as two projects.
  • "Push" on a run on another machine now works. It was forwarded, but it was not on the list of calls a machine accepts. This bug is on main.
  • Removed: the prompt carried in the address on a jump to another machine's dashboard, and the remembered local port. Neither could work any more.
  • The code's comments and names say "machine" too. That is most of the 72 files.

Not in this step

  • The --host flag and the shared key stay until the door exists (steps 2 and 3).
  • A run on another machine still drops off the list when OpenAgent restarts here.

Checks

  • The full build, typecheck and tests.
  • A real try: two OpenAgents on one Mac, each with its own home folder, one sending runs to the other, driven through the calls and in a browser.
  • One fresh reviewer. Five findings, all fixed.

DECISIONS.md

  • A new part, "Running on another machine", with five bullets for the picks above.
  • One word in the first bullet of "The dashboard": "a run on a device" is now "a run on another machine".

The saved machines move from the browser's storage to the home file, and a
machine's key is never handed to a browser. A run sent to another machine
names its project by the address its repository was cloned from, and starts
in that machine's own copy of it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@suleimansh
suleimansh merged commit 70d8289 into main Oct 10, 2026
6 checks passed
@suleimansh
suleimansh deleted the machines-file branch October 10, 2026 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant