instar 1.3.128 → 1.3.129
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/skills/autonomous/hooks/autonomous-stop-hook.sh +36 -0
- package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
- package/dist/core/PostUpdateMigrator.js +7 -5
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/dist/core/installCodexHooks.d.ts +7 -0
- package/dist/core/installCodexHooks.d.ts.map +1 -1
- package/dist/core/installCodexHooks.js +30 -2
- package/dist/core/installCodexHooks.js.map +1 -1
- package/dist/core/types.d.ts +13 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +18 -18
- package/upgrades/1.3.129.md +55 -0
- package/upgrades/side-effects/codex-autonomous-loop-driver.md +91 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
review-convergence: complete
|
|
3
|
+
approved: true
|
|
4
|
+
approved-by: justin (topic 13435, 2026-05-30 — "Yes, go ahead as long as we do it carefully and we have a clear plan to regress")
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Upgrade Guide — vNEXT
|
|
8
|
+
|
|
9
|
+
<!-- bump: patch -->
|
|
10
|
+
|
|
11
|
+
## What Changed — codex agents can now sustain a multi-turn autonomous run (ships DARK)
|
|
12
|
+
|
|
13
|
+
A `codex exec` session runs one turn then exits — there was no "keep going" Stop hook
|
|
14
|
+
like Claude has, so a codex agent (Codey) couldn't carry a long autonomous task. This is
|
|
15
|
+
the headline Claude/Codex parity gap.
|
|
16
|
+
|
|
17
|
+
The mechanism already existed end-to-end (codex fires Stop hooks and honors
|
|
18
|
+
`{decision:"block", reason}` — verified in the codex 0.133 binary); the only missing piece
|
|
19
|
+
was the wiring. `installCodexHooks` now registers the shared `autonomous-stop-hook.sh`
|
|
20
|
+
(with a `--codex` arg) as a SEPARATE codex Stop group — mirroring how Claude registers its
|
|
21
|
+
loop hook — and the hook self-gates on `autonomousSessions.codexLoopDriver.enabled`.
|
|
22
|
+
|
|
23
|
+
Ships **DARK**: the flag defaults false, so the standing codex hook exits immediately (no
|
|
24
|
+
behavior change for any codex session) until it is explicitly enabled. Claude's autonomous
|
|
25
|
+
mode is byte-for-byte unchanged (its loop hook is registered separately, with no `--codex`
|
|
26
|
+
arg).
|
|
27
|
+
|
|
28
|
+
## What to Tell Your User
|
|
29
|
+
|
|
30
|
+
Nothing changes yet — this ships turned off. It is the foundation that will let a codex
|
|
31
|
+
agent keep working through a long task on its own (the way a Claude agent already can),
|
|
32
|
+
once it is enabled and verified live. Rollback is instant: turn the flag back off.
|
|
33
|
+
|
|
34
|
+
## Summary of New Capabilities
|
|
35
|
+
|
|
36
|
+
| Capability | How to Use |
|
|
37
|
+
|-----------|-----------|
|
|
38
|
+
| Codex autonomous-loop driver | Set `autonomousSessions.codexLoopDriver.enabled: true` in `.instar/config.json` (default false / dark). Off → instant rollback, no redeploy. |
|
|
39
|
+
| Standing codex Stop group | `installCodexHooks` registers `autonomous-stop-hook.sh --codex` as its own Stop group; re-armed automatically on update. |
|
|
40
|
+
|
|
41
|
+
## Evidence
|
|
42
|
+
|
|
43
|
+
- Repro: a `codex exec` autonomous job stops after one turn — no `.codex/hooks.json` loop
|
|
44
|
+
hook (only the Claude path was wired). Prerequisites verified on disk: codex fires Stop
|
|
45
|
+
hooks (`config.toml [hooks.state]`); honors block+reason (0.133 binary `StopCommandOutputWire`).
|
|
46
|
+
- Before/after: before — codex Stop chain has only the review trio; after — a second Stop
|
|
47
|
+
group carries the loop driver, self-gated dark.
|
|
48
|
+
- Unit: `tests/unit/installCodexHooks.test.ts` — separate instar Stop group, idempotent
|
|
49
|
+
re-install (never stacks), user Stop group preserved.
|
|
50
|
+
- Unit: `tests/unit/autonomous-stop-hook-codex-gate.test.ts` — `--codex` + flag absent/false
|
|
51
|
+
→ approve (dark) even with an active job; flag true → block; no `--codex` (Claude) → blocks
|
|
52
|
+
regardless of the flag (Claude path unaffected). Both sides of the gate.
|
|
53
|
+
- `tsc --noEmit` clean; `npm run lint` clean.
|
|
54
|
+
- Spec: `docs/specs/codex-autonomous-loop-driver.md` (+ `.eli16.md`).
|
|
55
|
+
- Side-effects: `upgrades/side-effects/codex-autonomous-loop-driver.md`.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Side-Effects Review — Codex autonomous-loop driver
|
|
2
|
+
|
|
3
|
+
**Version / slug:** `codex-autonomous-loop-driver`
|
|
4
|
+
**Date:** `2026-05-30`
|
|
5
|
+
**Author:** `echo`
|
|
6
|
+
**Second-pass reviewer:** see below (required — lifecycle machinery)
|
|
7
|
+
|
|
8
|
+
## Summary of the change
|
|
9
|
+
|
|
10
|
+
Adds a codex registration of the shared autonomous-stop-hook so a `codex exec` session
|
|
11
|
+
sustains a multi-turn autonomous run (the codex analog of Claude's Stop-hook loop). A
|
|
12
|
+
SEPARATE codex Stop group (`autonomous-stop-hook.sh --codex`) is added in
|
|
13
|
+
`installCodexHooks`; the hook self-gates on `autonomousSessions.codexLoopDriver.enabled`
|
|
14
|
+
(default false → DARK). Claude's path is byte-for-byte unchanged.
|
|
15
|
+
|
|
16
|
+
## Decision-point inventory
|
|
17
|
+
|
|
18
|
+
1. `IS_CODEX` gate in the hook (— is this a codex-registered invocation?).
|
|
19
|
+
2. `codexLoopDriver.enabled` flag check (— should the codex loop actually run?).
|
|
20
|
+
3. `groupIsInstarOwned` (— is this Stop group instar-owned, to replace not duplicate?).
|
|
21
|
+
|
|
22
|
+
## 1. Over-block
|
|
23
|
+
Could it block a stop that SHOULD proceed? Only when the flag is ON, an autonomous job is
|
|
24
|
+
active for this session, AND tasks remain — which is exactly the intended block (continue
|
|
25
|
+
the run). With the flag OFF (default) it never blocks. The existing ownership/duration/
|
|
26
|
+
emergency/completion terminal checks (unchanged) still release the session.
|
|
27
|
+
|
|
28
|
+
## 2. Under-block
|
|
29
|
+
Could it fail to block when it SHOULD continue? When the flag is OFF, yes — by design
|
|
30
|
+
(dark). When ON, the only residual is the open binary question of whether codex runs the
|
|
31
|
+
second Stop group (Phase-5 / live verification gates this before enabling; fallback =
|
|
32
|
+
move into group 0). No silent data loss either way — at worst the codex run stops early,
|
|
33
|
+
same as today.
|
|
34
|
+
|
|
35
|
+
## 3. Level-of-abstraction fit
|
|
36
|
+
The driver lives where Claude's does (the autonomous skill hook) and is registered where
|
|
37
|
+
codex's other standing hooks are (`installCodexHooks`). The flag sits with the other
|
|
38
|
+
autonomous-mode settings (`autonomousSessions`). No new subsystem.
|
|
39
|
+
|
|
40
|
+
## 4. Signal vs authority compliance
|
|
41
|
+
**Required reference:** [docs/signal-vs-authority.md](../../docs/signal-vs-authority.md)
|
|
42
|
+
The hook is an AUTHORITY surface by nature (a Stop hook returns block/approve — same as
|
|
43
|
+
Claude's existing loop hook and codex's existing stop-gate-router). It does not newly
|
|
44
|
+
elevate authority: it reuses the established Stop-hook contract. The dark flag means the
|
|
45
|
+
authority is dormant until explicitly enabled. No monitoring/signal component is converted
|
|
46
|
+
into a blocker.
|
|
47
|
+
|
|
48
|
+
## 5. Interactions
|
|
49
|
+
- **Review trio (stop-gate-router / response-review / claim-intercept / scope-coherence):**
|
|
50
|
+
the driver is the LAST hook in the SAME Stop group (slot stop:0:N). Within-group block
|
|
51
|
+
precedence vs the router is verified live before enabling; worst case the session still
|
|
52
|
+
continues via the router (never strands).
|
|
53
|
+
- **Claude autonomous mode:** independent registration (settings.json vs .codex/hooks.json);
|
|
54
|
+
`IS_CODEX=0` for Claude → unchanged.
|
|
55
|
+
- **armCodexHooks:** the new hook changes the hooks.json hash → re-arm on update (handled
|
|
56
|
+
by the existing migration). Because it rides group 0 (a group codex already trusts/arms),
|
|
57
|
+
it adds NO new arm slot — avoiding the recurring-arm-spawn side-effect a separate group
|
|
58
|
+
(stop:1:0) would have caused (caught by the second-pass review, then designed out).
|
|
59
|
+
|
|
60
|
+
## 6. External surfaces
|
|
61
|
+
None new. No HTTP route, no Telegram message, no external API. The hook talks only to the
|
|
62
|
+
local server's existing `/autonomous/evaluate-completion` (unchanged) when a completion
|
|
63
|
+
condition is set.
|
|
64
|
+
|
|
65
|
+
## 7. Rollback cost
|
|
66
|
+
Lowest tier. Set `autonomousSessions.codexLoopDriver.enabled: false` → the standing hook
|
|
67
|
+
exits immediately (instant, no redeploy, no session kill). Full PR revert is clean
|
|
68
|
+
(additive change; removing the Stop group + the `IS_CODEX` block restores prior behavior).
|
|
69
|
+
|
|
70
|
+
## Conclusion
|
|
71
|
+
Safe to ship DARK. The only non-trivial residual (does codex run a second Stop group) is
|
|
72
|
+
gated behind the default-off flag and resolved by live verification before enabling — per
|
|
73
|
+
Justin's "careful + clear plan to regress" condition.
|
|
74
|
+
|
|
75
|
+
## Second-pass review (if required)
|
|
76
|
+
|
|
77
|
+
**Reviewer:** independent second-pass agent (lifecycle machinery — required)
|
|
78
|
+
**Status:** DONE 2026-05-30 — **CONCUR on shipping DARK.** Verified PASS on: Claude path
|
|
79
|
+
unchanged, dark gate cannot leak (all config-read failure paths → disabled), `$0` anchor,
|
|
80
|
+
groupIsInstarOwned idempotency, migration parity (both halves land). The reviewer caught a
|
|
81
|
+
fleet-wide arm side-effect from the original separate-group design (a `stop:1:0` slot codex
|
|
82
|
+
may never trust → recurring codex-TUI arm spawns on every update, even dark). **Resolved**
|
|
83
|
+
by moving the driver into the existing Stop group (slot stop:0:N) — no new arm slot. The
|
|
84
|
+
remaining open item (within-group block precedence + that the loop actually re-prompts a
|
|
85
|
+
real codex run) is gated to live verification BEFORE the flag is enabled, per the spec's
|
|
86
|
+
Phase 5 — it is not a merge/dark-ship blocker.
|
|
87
|
+
|
|
88
|
+
## Evidence pointers
|
|
89
|
+
- Unit: `tests/unit/installCodexHooks.test.ts` (separate Stop group, idempotent, user-group preserved).
|
|
90
|
+
- Unit: `tests/unit/autonomous-stop-hook-codex-gate.test.ts` (dark default / disabled / enabled / Claude-unaffected — both sides of the gate).
|
|
91
|
+
- Spec: `docs/specs/codex-autonomous-loop-driver.md` (+ `.eli16.md`).
|