Repository navigation
Conversation
Two-tier --restart-daemon coordination, per the maintainer review: - ensure() probes the daemon, then attempts 'app-server daemon reload-auth' (codex daemons) with a 10s budget before falling back to the full restart (upstream daemons without reload support) - reload outcomes: .reloaded (credentials applied in place, no restart) and .deferred (daemon busy with a running turn — deferred, exit 0, rerun later); reload unavailability or failure falls through to the existing restart path - diagnostics for both new outcomes; docs updated - fake lifecycle script gains reload-auth variants; client + integration expectations updated for the version → reload-auth → restart sequence [skip ci]
Owner
Author
|
Superseded: the two-tier implementation is now pushed directly to this PR's branch (afded66) — see the commits above. Closing this stacked draft to avoid duplication. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WIP / draft — stacked on #164 (base is #164's head branch; this diff contains only the maintainer-side fix implementing the requested two-tier coordination). Will be retargeted to main after #164 merges.
What
Implements the two-tier
--restart-daemoncoordination requested in the #159-style review on #164:ensure()probes the daemon, then attemptscodex app-server daemon reload-auth(codex daemons) with a dedicated 10s budget before falling back to the full restart (upstream daemons without reload support).reloaded(credentials applied in place, no restart, no session interruption) and.deferred(daemon busy with a running turn — exit 0, rerunswitch --restart-daemonlater); reload unavailability, failure, or timeout falls through to the existing restart pathEnterkeeps its switch-account meaning; the toggle stays onc... (key contract unchanged:--restart-daemonremains the flag, Enter remains the switch action)Why this shape
SkippedBusy) defers instead of restarting — restarting would kill the very turn that made the daemon busy.Implementation
workflows/codex_daemon.zig:ensure()two-tier orchestrator,tryReload()(classify: success →.reloaded,skipped the auth reload→.deferred, anything else → fallback), reload budget 10s vs the 120s restart budgetworkflows/switch.zig:restart()→ensure(); exit-1 contract unchanged (onlyunknown/restart_failed/timed_outfail)cli/output.zig: diagnostics for.reloaded/.deferredversion → reload-auth → restartsequences, reload-supported/unsupported/busy scenarios)Validation
zig build -Doptimize=ReleaseFastclean; fullzig build testexit 0