OpenProgram Docs

Stable and development instances

Stable is the official App from a GitHub Release, changed only by its own updater. Commits go to dev and run on the development instance. A deploy does not restart stable, so a stable conversation can deploy and check http://127.0.0.1:18200.

StableDevelopment
Codethe published release (Developer ID signed)the commit deployed last, dev by default
Runs as/Applications/OpenProgram.app/Applications/OpenProgram Dev.app (macOS) or a browser; runtime in ~/.openprogram-dev/runtime
Port1810018200
Browser debugging port92239224
State~/.openprogram (default profile)~/.openprogram-dev (dev profile)
Updated byits own updater: Settings → General → Applicationopenprogram dev deploy, then scripts/local-instances/refresh-dev-instance.sh

Rules: openprogram/operations/worker/dev_instance.py. openprogram dev status shows the stable App's release version and health, the development instance's commit and health, and the dev commits not deployed yet.

Deploying to the development instance

openprogram dev deploy [ref] (default dev) checks the commit out into the detached worktree ~/.openprogram-dev/source and runs scripts/local-instances/refresh-dev-instance.sh there. Nothing of stable is stopped or written.

  1. Refuse uncommitted or untracked files. One deploy runs at a time; a second waits.
  2. Sync the Git hooks and report docs findings since the last deploy, without stopping. Build the Web assets and the OpenProgram wheel; a page that breaks the format becomes a visible error page.
  3. The Web export is built only when a tracked file other than Python, the documentation and the tests changed since the last deploy; otherwise the last export is staged again.
  4. Install a full CPython 3.12 into the runtime once (uv python install --install-dir), sync the locked dependency set a release installs, reinstall the wheel.
  5. macOS: build the helper OpenProgram Dev.app (ai.openprogram.runtime.dev) and point runtime-manifest.json at it. The worker gets its own identity, so Screen Recording, Accessibility and similar grants are separate from stable.
  6. Set the dev profile's port and bind the Program catalog.
  7. Install or restart only the dev worker as a login service (launchd or systemd; a plain stop and start elsewhere). Wait up to 300 seconds for /healthz, then record the commit in runtime/source-revision.
  8. macOS: run scripts/local-instances/install-dev-app.sh.
The development App
AspectBehaviour
Identity/Applications/OpenProgram Dev.app, bundle id ai.openprogram.desktop.dev; macOS only
ContentsThe deployed commit's Desktop shell, no runtime. Contents/Resources/instance.json names the dev profile, port, debugging port and runtime; apps/desktop/main/instance.js reads it.
WorkerStarted and authenticated through the development runtime under OPENPROGRAM_PROFILE=dev
Electron data~/Library/Application Support/OpenProgram Dev
IgnoresThe stable App's install lock and release updates
Buildscripts/release/build-desktop-shell.sh: electron-builder with the release configuration minus the runtime, so the Electron pinned in apps/desktop/package.json runs here first. Built only when apps/desktop or the lockfile changed; otherwise the shell kept in ~/.openprogram-dev/desktop-shell is named, signed and installed
Signinglocal-macos-signing.py sign --development, the local identity; signs the outer App alone
InstallBuilt next to the stable App, never into it. The bundle is swapped while the App is closed and reopened if it was open, in front only when the user was in it.
Browser toolprograms/applications/browser/app_endpoint.py picks the debugging port by profile, so the development agent never drives the stable App's tabs

Signing in

The worker mints a new owner token on every start, so a deploy signs out browsers. The development App fetches its new token itself.

CommandResult
openprogram dev openOpens the default browser, signed in; the sign-out message names this command
openprogram dev auth-urlPrints a sign-in link for another browser

State and models

The credential store's root is the active profile's state directory, so the dev profile never reads or refreshes default-profile logins. openprogram dev copy-models brings over the model setup:

CopiedNot copied
Config keys providers, last_used_model; each company's API keysOAuth logins: their refresh tokens rotate, so two instances would sign each other out. Sign in again if needed.
API-key and CLI-delegated credentials (read another tool's login by reference)Conversations, Agents, memory

The ChatGPT login is shared: the development instance reads the Codex CLI's ~/.codex/auth.json, and the stable instance mirrors its login of the same account into that file. Each adopts the newer login the other wrote instead of spending a used refresh token (One ChatGPT login per machine).

From a conversation

In the development instance (the dev profile, with a source repository that has a dev branch), self_update(action="prepare") uses the dev_deploy backend: a change is a commit on dev, and deploying it is the whole update. The call saves the request and starts a detached controller; the rest runs after the calling turn is saved.

StepWhat happensPhase
1Wait for the calling turn to be savedpreparing
2Rebase the candidate onto dev in its worktree, then git merge --ff-only in the primary checkout. A moved dev or a held index.lock retries up to 10 times with backoffbuilding
3openprogram dev deploy <sha>, which restarts the worker the request came from; skipped when the instance already serves the commitbuilding
4System probe against port 18200 and the dev state directory, then a browser probe: open the signed-in Web app until the message box appearsbuilding
5The result reaches the origin conversation through the ordinary delivery and follow-up turn on the restarted workersucceeded

The probe compares the doctor rows with the instance's own before the change, so a row already failing, such as a login development lacks, blocks nothing. The stable App is never waited for or touched.

Ends asWhen
succeededThe development instance serves the landed commit and passes both probes
abortedThe calling turn never ends; a rebase conflict or a dirty file in the way (lists the files); the deploy or a probe fails. A commit that landed stays on dev, and the result says so: the fix is the next commit, made and deployed like any other

In the official App the same call is refused before any request is saved: the App is Developer ID signed and cannot be rebuilt here, so the refusal points to Check for updates in Settings.

Controller
AspectBehaviour
BackendPicked by openprogram/operations/self_update/control/backend.py; this one is control/dev_deploy.py
LocationA private copy of the runtime under <state>/self-updates/<id>/controller, outside the development runtime: the deploy replaces that runtime, and the code imports lazily
Runs asA launchd job on macOS, a detached session elsewhere, with neither a session nor a profile in its environment. A worker start restarts one that died
RestartSteps are idempotent. A journal in the update's directory records the landed commit, so a restart continues from its phase
Undoself_update(action="undo", target=<commit>) makes a git revert in a worktree of dev and submits it as a normal prepare
Retryself_update(action="retry") does not apply; a fix is a new prepare

Publishing

Neither instance pushes anything. See Publishing source to GitHub.

Source checkout

openprogram dev and the self-update controller find the repository through OPENPROGRAM_SOURCE_REPO, else ~/.openprogram-dev/source-repo, which scripts/local-instances/refresh-dev-instance.sh writes with the main checkout, not the build worktree.

Implementation status

StatusItems
Implementedscripts/local-instances/refresh-dev-instance.sh, openprogram dev status|deploy|open|auth-url|copy-models, the development runtime's macOS identity and login service, per-profile credentials, in-chat self-update through the dev_deploy controller
Not yetThe development instance is reachable only from this machine
Last updated · 2026-11-25