|
52 | 52 | # CODEX_FLEET_CLAIM_MODE=both|event|poll # default: both |
53 | 53 | set -eo pipefail |
54 | 54 |
|
| 55 | +# --help / --version plumbing (see lib/version.sh). Handled before sourcing |
| 56 | +# _tmux.sh / claim-fence.sh so docs work even when those libs misbehave. |
| 57 | +FLEET_USAGE="force-claim.sh — dispatch ready plan sub-tasks across all |
| 58 | +non-empty openspec plans onto idle codex panes. |
| 59 | +
|
| 60 | +Usage: |
| 61 | + bash scripts/codex-fleet/force-claim.sh # one-shot |
| 62 | + bash scripts/codex-fleet/force-claim.sh --dry-run # show plan, no dispatch |
| 63 | + bash scripts/codex-fleet/force-claim.sh --loop # event + poll every 15s |
| 64 | + bash scripts/codex-fleet/force-claim.sh --loop --quit-when-empty |
| 65 | + bash scripts/codex-fleet/force-claim.sh --loop --empty-threshold=5 |
| 66 | + bash scripts/codex-fleet/force-claim.sh --no-token-check |
| 67 | + bash scripts/codex-fleet/force-claim.sh --help | --version |
| 68 | +
|
| 69 | +Env: |
| 70 | + FORCE_CLAIM_REPO / CODEX_FLEET_REPO_ROOT repo root (default: derived) |
| 71 | + FORCE_CLAIM_SESSION tmux session (default: codex-fleet) |
| 72 | + FORCE_CLAIM_WINDOW tmux window (default: overview) |
| 73 | + FORCE_CLAIM_PLAN_JSON pin to a single plan |
| 74 | + FORCE_CLAIM_INTERVAL loop poll seconds (default: 15) |
| 75 | + FORCE_CLAIM_EMPTY_THRESHOLD consecutive empties to quit (default: 3) |
| 76 | + CODEX_FLEET_CLAIM_MODE both | event | poll (default: both) |
| 77 | + FORCE_CLAIM_TOKEN_METER path to token-meter.sh |
| 78 | + FORCE_CLAIM_TOKEN_MIN_5H / _MIN_WK cap thresholds for skipping panes |
| 79 | + FORCE_CLAIM_SKIP_READY_CHECK=1 bypass worker-ready gate |
| 80 | +
|
| 81 | +Flags: |
| 82 | + --dry-run show plan; do not dispatch |
| 83 | + --loop event + poll backstop |
| 84 | + --interval=N poll interval (seconds) |
| 85 | + --quit-when-empty exit 0 after empty-streak |
| 86 | + --empty-threshold=N consecutive empty passes required |
| 87 | + --no-token-check bypass token-meter cap filter |
| 88 | + -h, --help print this help and exit 0 |
| 89 | + --version print '<basename> <FLEET_VERSION>' and exit 0" |
| 90 | +source "$(dirname "${BASH_SOURCE[0]}")/lib/version.sh" |
| 91 | +handle_help_version_flags "$@" |
| 92 | + |
55 | 93 | # Route every `tmux ...` call through scripts/codex-fleet/lib/_tmux.sh — when |
56 | 94 | # CODEX_FLEET_TMUX_SOCKET is set in the env (e.g. by full-bringup.sh), this |
57 | 95 | # transparently rewrites the call to `tmux -L $SOCKET ...`. Default behavior |
|
0 commit comments