>_ codex-control
Approve Codex commands from your Apple Watch — no need to stay at your laptop.
Codex runs on your remote Linux server inside tmux. When it needs permission, you get a push notification and approve with a single tap on your wrist.
$ git clone https://github.com/CryptoPilot16/codex-control.git
$ cd codex-control
$ bash ./restart.sh
✓ Watcher started
✓ Webhook listening on :8787# How It Works
Three steps from Codex prompt to approval on your wrist
Codex runs on your server
Start Codex inside a tmux session on your remote Linux server. It keeps running even when you close your laptop or disconnect from SSH.
A watcher detects approval prompts
A lightweight monitoring script polls the tmux output. When Codex asks for permission to run a shell command, the watcher sends a push notification to your phone and watch via Pushover.
You tap approve on your Apple Watch
An iOS Shortcut on your watch sends a secure webhook request back to the server. The webhook injects the approval keystroke into tmux and Codex continues working.
~ Why It Matters
Stop babysitting your terminal. Approve from anywhere.
Making coffee
Step away from your desk without pausing Codex. Approve commands from your wrist while your hands are busy.
In a meeting
Codex keeps working in the background. A quick glance at your watch, a tap, and the build continues — no one notices.
On the go
Leave the house entirely. Your server runs Codex, your watch handles approvals. Code gets written while you walk the dog.
Overnight builds
Kick off a long task before bed. When Codex needs approval at 2 AM, your watch buzzes gently — tap and go back to sleep.
& Technology Overview
Six components. No cloud services beyond notifications.
Codex CLI in tmux
Codex runs inside a persistent tmux session on your Linux server so it survives SSH disconnects.
codex_watch.sh
A bash script that polls tmux output for approval prompts and triggers push notifications.
approve_webhook.py
A lightweight Python HTTP server that validates a shared secret and injects keystrokes into tmux.
Tailscale Serve
Exposes the webhook over your private tailnet with HTTPS — no public ports, no port forwarding.
Apple Watch Shortcut
An iOS Shortcut that sends a single GET request to the webhook when you tap Approve on your watch.
Pushover
Delivers instant push notifications to your iPhone and Apple Watch when Codex needs a decision.
$ Quick Start
Three commands to get remote Codex approval running
Clone the repo
git clone https://github.com/CryptoPilot16/codex-control.git
cd codex-controlConfigure environment
cp .env.example .env
# Edit .env and set:
APPROVE_SECRET=your-secret-here
PUSHOVER_APP_TOKEN=your-pushover-token
PUSHOVER_USER_KEY=your-pushover-keyStart the services
bash ./restart.sh
# Or start manually:
# Terminal 1: python3 approve_webhook.py
# Terminal 2: bash ./codex_watch.shEnvironment Variables
APPROVE_SECRETShared secret for webhook authPUSHOVER_APP_TOKENPushover application tokenPUSHOVER_USER_KEYPushover user key for alertsTMUX_SESSIONTarget pane (default: codex:0.0)APPROVE_PORTWebhook port (default: 8787)COOLDOWN_SECONDSMin time between notifications (30)# Architecture
The approval flow from Codex to your wrist — step by step
Codex (tmux)
Persistent execution environment — keeps running when SSH disconnects
codex_watch.sh
Polling loop that monitors tmux output for approval prompts
approve_webhook.py
HTTP server that validates secrets and injects keystrokes into tmux
Tailscale Serve
Exposes webhook over your tailnet via *.ts.net HTTPS — no public ports
Pushover
Notification delivery to your iPhone and Apple Watch
Apple Watch
One-tap approval via iOS Shortcuts — runs a simple GET request
Security Model
- ✓Webhook stays local — no public port exposure
- ✓Tailscale HTTPS encrypts over your tailnet
- ✓Shared secret required via
?secret=orX-Secretheader
Webhook Endpoints
/approveSends y + Enter (approve)/approve2Sends p (alternative approve)/denySends esc or 3 (deny)@ Infrastructure
What runs where
Landing Page
This site is a static Next.js app deployed on Vercel.
https://codex-control.clawnux.comApproval Endpoint
The webhook runs privately on your Linux server, accessible only through your Tailscale network. It is never exposed to the public internet.