Repository navigation
feat(vibe): Add codex-fleet-monitor skill - #310
Merged
Merged
Conversation
- Background watcher for a fleet of Codex App Server threads (local and one ssh host) plus their pull requests; exits with a diff on the first change - Reads liveness from each thread's last turn and item count, so a turn left open by a silent usage limit shows as STALLED - vibe 1.0.57, README and changelog entries Testing: pytest plugins/ (2430 passed), ruff, plugin-manifests typecheck and tests, node --check and zsh -n on the scripts Risks: None identified, the skill only reads thread and PR state
- Describe when to reach for the skill and why a turn-only watcher misses a usage-limit stall
liveness.mjs no longer imports the app-server-orchestrator skill from ~/.codex/skills. It carries a small App Server client (WebSocket over codex app-server proxy, initialize, thread/read) in one file so the ssh copy to a remote host still works. sessions.txt takes 'local|remote <label> <threadId>' as well as the older '<name>' form that reads a state file. Adds a node:test suite with a fake server.
This was referenced Oct 20, 2026
- ratelimit.mjs reads account/rateLimits/read through the client liveness.mjs already exports and prints codex-usage <where> <band>% <state> resets=<n>. snapshot.sh runs it locally and on REMOTE_HOST, copying both scripts there. - Optional REQUESTS_DIR and REMOTE_REQUESTS_DIR print a requests line so the watcher wakes when a session drops a delegated-work request. - watch.sh keeps the previous run's last-snapshot.txt as its base, so a change between a watcher exit and its re-arm is still reported. - PR check counts are only updated once settled; while checks are pending the last settled counts show with a (running) suffix. - SKILL.md documents the new lines and what to do about each.
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.
Purpose
Adds a
codex-fleet-monitorskill to the vibe plugin: one background command that polls a fleet of Codex App Server threads (local and one ssh host) plus the GitHub PRs they produce, and exits with a diff on the first change. It flags IDLE, STALLED, FAILED, merge conflicts, review and comment counts, settled check changes and new PRs.A watcher that only checked turn ids missed a Codex usage-limit stall, because the turn stays open and silent. This one reads each thread's last turn (status, error, item count) and reports a turn whose item count has not grown for
STALL_SECONDSas STALLED.It also:
codex-usage <local|remote> <band>% <state> resets=<n>per machine fromaccount/rateLimits/read(band is used percent floored to 10; state isok,LIMIT,LIMIT-SPENDING-CREDITSorLIMIT-STOPPED). The skill tells the agent to warn the user when the band rises fast, and onLIMIT-SPENDING-CREDITSto tell the user at once and stop sending turns unless they approve paid credits.REQUESTS_DIR/REMOTE_REQUESTS_DIR, printsrequests <where> <count> <newest file>so the watcher wakes when a Codex session drops a delegated-work request for a Claude worker.last-snapshot.txt, so a change between a watcher exit and its re-arm is still reported (resetting the base on every start hid a session switching to paid credits).(running), so lines do not flap.Everything stays inside the plugin:
liveness.mjstalks to the managed App Server throughcodex app-server proxywith Node built-ins only, andratelimit.mjsreuses its exported client.snapshot.shcopies both files to<REMOTE_STATE_DIR>/.fleet-monitor/on the remote host. Both bound themselves with an unref'd in-process timer, since the repo's no-GNU-timeout contract rules outtimeoutwrappers.Affected files
Commands run
codex-usage localandcodex-usage remotelines over ssh,requestslines for local and remote dirs (andUNREADABLEfor a missing one), and settled and(running)check counts on this PR through aghshim; watch.sh reported a request file dropped before it was re-armed.