English · 简体中文
Drive a Mac-resident coding agent (the Codex CLI) from your iPhone: pick a project, send a task, review the plan, approve it, and let the agent implement, commit, and report back — all from your phone.
RemoteAgentWorkbench is a small, self-hostable control plane plus a native iOS/macOS client. It is intentionally minimal and built to be extended with more workflows.
flowchart LR
iPhone["iPhone app"] -- "create task / approve" --> Server["Control plane<br/>(TypeScript + SQLite)"]
Server -- "assignments / SSE" --> iPhone
Runner["Mac runner"] -- "register / poll / report" --> Server
Runner -- "runs" --> Codex["Codex CLI"]
Runner -- "git commit / PR / MR" --> Repo["Your repos"]
Mac["Mac app"] -- "reads local history" --> History["~/RemoteAgentWorkbenchData"]
Runner -- "writes" --> History
server/— a minimal TypeScript control plane: project index, task metadata, approvals, lightweight events, and SSE. It never stores full transcripts.runner/— a daemon on your Mac that does the real work: runs the Codex CLI, drives Git, keeps full local history, and (optionally) publishes Markdown reports to a GitHub repo.ios-app/— the SwiftUI iPhone client for project-level orchestration (start, observe, approve, continue). The same project also builds a companion macOS app that reads local task history and~/.codex/sessionsdirectly.deploy/— templates for VPS, Caddy, systemd, and launchd.
The default path is "projects first + local history + lightweight phone status + GitHub reports":
- Maintain a fixed project list on the Mac in
~/RemoteAgentWorkbenchData/projects.json. - The runner syncs that list to the server on startup; the iPhone home screen shows your projects.
- Start a task from a project page — no need to retype
repo/baseBrancheach time. - Mark a few high-frequency projects as
isFeaturedto pin them on the phone. - Create a folder from a directory preset on the phone; the runner creates it and adds it to Projects automatically.
- The runner locks a real repo or a plain folder. With Git it follows a Git flow; without Git it works directly in the folder.
- The review flow runs a read-only planning turn first; after you approve the plan on the phone it moves to the implementation turn.
- The runner writes full local history to
~/RemoteAgentWorkbenchData/tasks/<taskId>/. - Direct Submit goes straight from plan to implementation; a Git repo completes after a successful local commit, a plain folder completes once changes are saved.
- After each plan, implementation, or Git action, the runner updates
report.mdand can push it to a separate GitHub reports repo. - The phone only syncs recent lightweight events; the full history stays on the Mac. The Mac app reads the local task directories and
~/.codex/sessionsfor the complete picture.
- iPhone project list, project detail, in-project task creation, approvals, and report links
- Runner registration, heartbeat, and offline detection
- Lightweight SQLite persistence (project index, task metadata, approvals, recent events, report URLs)
- Completed tasks keep ~30 days of lightweight metadata, then auto-clean
- Three workspace sources: local repo path, plain local folder, or remote Git URL
- Task-level workspace locking
- Two delivery modes per
coding_session:review_required— commit / PR / MR go through approvaldirect_commit/ Direct Submit — a Git repo can commit locally after checks pass; a plain folder just needs its changes saved
- Codex CLI
new threadandresume thread commit / rebase / push / create PR / MRapproval flow (PR vs. MR chosen automatically from the repoorigin)- Full local history per task:
task.json,events.jsonl,artifacts/,report.md,session.json - Companion macOS app with local Projects and Local History windows
- Automatic GitHub report publishing with
reportURLback-fill - Real-time task detail over SSE, fetched per project rather than globally polled
- macOS with Xcode 16+ and the iOS Simulator
- XcodeGen (
brew install xcodegen) to generate the Xcode project - Node.js 20+ for the server and runner
- The Codex CLI, installed and authenticated on the Mac — the runner shells out to it for real coding turns
- Optional:
gh(logged in) for GitHub PRs;GITLAB_TOKENfor GitLab MRs
cd server
npm install
cp .env.example .env
npm run dev # http://127.0.0.1:8787Recommended extra env vars: DATA_ROOT, DATABASE_PATH, TASK_RETENTION_DAYS=30.
cd runner
npm install
cp .env.example .env
npm run devRuntime data lives under ~/RemoteAgentWorkbenchData/ (repos, tasks, projects.json, report-publisher). Point the RUNNER_* env vars elsewhere to relocate it.
To create review requests from the phone:
- GitHub — run
gh auth loginon the Mac runner - GitLab — set
GITLAB_TOKENin the runner env (andGITLAB_BASE_URLfor self-hosted GitLab)
The phone never stores a GitHub/GitLab token and the server never sees one — review requests are created only on the Mac runner.
cd ios-app
xcodegen generate
open RemoteAgentWorkbench.xcodeprojThe app defaults to http://127.0.0.1:8787; change it under Settings to point at your own control plane.
Security:
.envfiles are gitignored — never commit real secrets. SetRUNNER_SHARED_SECRETto a long random value when exposing the server beyond localhost (leave it blank on both server and runner to disable runner auth for local dev).
review_required— best for projects that ship via PR/MR. The agent finishes the change and checks, then waits for your approval.direct_commit/ Direct Submit — best for "just get it done" tasks. A Git repo commits locally at the end of the implementation turn; a plain folder completes once files are saved. If a Git repo's turn ends without a commit, the task stays inawaiting_human_input.
cd server && npm test && npm run build
cd runner && npm test && npm run build
cd ios-app && xcodegen generate && xcodebuild -project RemoteAgentWorkbench.xcodeproj \
-scheme RemoteAgentWorkbench -destination 'generic/platform=iOS Simulator' buildOpen in Codex Appopens the workspace; it does not inject the thread into the desktop app.- The phone (v1) cannot fully edit the project list (use "Create Folder");
projects.jsonon the Mac is the source of truth. - The phone (v1) has no "delete task" button; disk is bounded by server metadata + auto-clean.
- The server does not store full transcripts, Codex JSONL, or raw stdout/stderr.
- Automatic GitHub report push requires a separately configured reports repo.
The boundaries are designed for adding more workflows:
- Add task command/result types in
server/src/domain/models.ts - Add state-machine branches in
server/src/services/taskService.ts - Add an assignment handler in
runner/src/index.ts - Add the matching form and detail actions in the iOS app
Contributions are welcome — see CONTRIBUTING.md for local setup, tests, and conventions.
MIT © 2026 Fernando

