[daemon] Add app-server daemon lifecycle management#20718
Conversation
55c587a to
e9d25cb
Compare
3ca4240 to
6ef5841
Compare
|
do we want to be able to auto-update the logic of the daemon itself? for example, the hourly updater loop? seems important to be able to do, since otherwise we get stuck with whatever gets initially deployed onto a remote machine codex's take FWIW:
|
owenlin0
left a comment
There was a problem hiding this comment.
(can be punted) should we have a way to enable remote control after the daemon and corresponding app-server process is already running? maybe something explicit and narrowly scoped like a codex app-server daemon enable/disable-remote-control?
| - Stream events: After `turn/start`, keep reading JSON-RPC notifications on stdout. You’ll see `item/started`, `item/completed`, deltas like `item/agentMessage/delta`, tool progress, etc. These represent streaming model output plus any side effects (commands, tool calls, reasoning notes). | ||
| - Finish the turn: When the model is done (or the turn is interrupted via making the `turn/interrupt` call), the server sends `turn/completed` with the final turn state and token usage. | ||
|
|
||
| ## Daemon Lifecycle Commands |
There was a problem hiding this comment.
maybe let's remove this from the app-server README for now until we make this the "blessed way" to run app-server.
| @@ -0,0 +1,95 @@ | |||
| # codex-app-server-daemon | |||
There was a problem hiding this comment.
should we call this experimental?
There was a problem hiding this comment.
do you mean rename crate or just make it explicit in the documentation?
There was a problem hiding this comment.
just in the documentation
25a5dc8 to
548265e
Compare
Why
Desktop and mobile Codex clients need a machine-readable way to bootstrap and manage
codex app-serveron remote machines reached over SSH. The same flow is also useful for bringing up app-server withremote_controlenabled on a fresh developer machine and keeping that managed install current without requiring a human session.What changed
codex-app-server-daemoncrate and wire it intocodex app-server daemonlifecycle commands:start,restart,stop,version, andbootstrapenable-remote-controlanddisable-remote-controlcommands that persist the launch setting and restart a running managed daemon so the change takes effect immediatelyinstall.shlayout for daemon-managed binaries and always launchCODEX_HOME/packages/standalone/current/codexcodex-rs/app-server-daemon/README.mdVerification
cargo test -p codex-app-server-daemon -p codex-clicb4:bootstrap --remote-control,restart,version,stopFollow-up
pid-update-loopcan replace its own executable image after installing a newer managed Codex binary.