instar 0.28.114 → 0.28.115

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.
@@ -36,8 +36,8 @@ export interface InteractiveLaunchOptions {
36
36
  /** Absolute path to the CLI binary for the selected framework. */
37
37
  binaryPath: string;
38
38
  /**
39
- * Optional session ID to resume into. Claude uses `--resume <id>`;
40
- * Codex uses `--resume <id>` too but interprets the id differently;
39
+ * Optional session ID to resume into. Claude uses `--resume <id>` (flag).
40
+ * Codex uses `resume <id>` (subcommand inserted right after the binary);
41
41
  * unsupported frameworks may ignore.
42
42
  */
43
43
  resumeSessionId?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"frameworkSessionLaunch.d.ts","sourceRoot":"","sources":["../../src/core/frameworkSessionLaunch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAE9E;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,UAAU,GAAG,SAAS,CAAC;AAE/D;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,qBAAqB,EAChC,WAAW,EAAE,MAAM,GAAG,SAAS,GAC9B,MAAM,GAAG,SAAS,CA0BpB;AAED,MAAM,WAAW,wBAAwB;IACvC,kEAAkE;IAClE,UAAU,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,WAAW,GAAG,iBAAiB,GAAG,oBAAoB,CAAC;IAC1E;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAC;CAC5C;AAED,MAAM,WAAW,qBAAqB;IACpC,kFAAkF;IAClF,IAAI,EAAE,MAAM,EAAE,CAAC;IACf;;;;OAIG;IACH,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtC;AAgGD;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,qBAAqB,EAChC,OAAO,EAAE,wBAAwB,GAChC,qBAAqB,CAMvB;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE;IACjD,OAAO,CAAC,EAAE,qBAAqB,CAAC;IAChC,eAAe,CAAC,EAAE,qBAAqB,CAAC;IACxC,YAAY,CAAC,EAAE,qBAAqB,GAAG,IAAI,CAAC;CAC7C,GAAG,qBAAqB,CAExB;AAED;;;;;GAKG;AACH,MAAM,WAAW,qBAAqB;IACpC,kEAAkE;IAClE,UAAU,EAAE,MAAM,CAAC;IACnB,mCAAmC;IACnC,MAAM,EAAE,MAAM,CAAC;IACf;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,WAAW,GAAG,iBAAiB,GAAG,oBAAoB,CAAC;IAC1E;;;;;;;;OAQG;IACH,kBAAkB,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAC;CAC5C;AAED,MAAM,WAAW,kBAAkB;IACjC,kFAAkF;IAClF,IAAI,EAAE,MAAM,EAAE,CAAC;IACf;;;;OAIG;IACH,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtC;AAiED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,qBAAqB,EAChC,OAAO,EAAE,qBAAqB,GAC7B,kBAAkB,CAMpB"}
1
+ {"version":3,"file":"frameworkSessionLaunch.d.ts","sourceRoot":"","sources":["../../src/core/frameworkSessionLaunch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAE9E;;;;;;GAMG;A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AC,EAAE,WAAW,GAAG,iBAAiB,GAAG,oBAAoB,CAAC;IAC1E;;;;;;;;OAQG;IACH,kBAAkB,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAC;CAC5C;AAED,MAAM,WAAW,kBAAkB;IACjC,kFAAkF;IAClF,IAAI,EAAE,MAAM,EAAE,CAAC;IACf;;;;OAIG;IACH,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtC;AAiED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,qBAAqB,EAChC,OAAO,EAAE,qBAAqB,GAC7B,kBAAkB,CAMpB"}
@@ -104,8 +104,26 @@ const codexCliBuilder = (options) => {
104
104
  const resolvedModel = isLocal
105
105
  ? (options.defaultModel ?? 'llama3.2:latest')
106
106
  : (resolveModelForFramework('codex-cli', options.defaultModel) ?? 'gpt-5.3-codex');
107
+ // Codex's `resume` is a subcommand (`codex resume <SESSION_ID>`), not a
108
+ // flag. When resuming, insert it as the first argument after the binary
109
+ // path — every other flag (`--model`, `--sandbox`, etc.) is accepted by
110
+ // the `resume` subcommand and behaves the same as on a fresh launch
111
+ // (verified against codex 0.130 `codex resume --help`). When not
112
+ // resuming, argv stays in the original fresh-launch shape.
113
+ //
114
+ // Stale-id handling: if the tracked SESSION_ID no longer exists in
115
+ // Codex's session store (~/.codex/sessions/...), `codex resume` exits
116
+ // non-zero at startup and the tmux pane shows an error. SessionManager's
117
+ // respawn logic catches the dead pane and the route handler can clear
118
+ // the stale resume id (per existing PR #248 framework-swap pattern).
119
+ // We don't pre-validate filesystem presence here to avoid coupling the
120
+ // launch helper to Codex's on-disk session layout.
121
+ const resumePrefix = options.resumeSessionId
122
+ ? ['resume', options.resumeSessionId]
123
+ : [];
107
124
  const argv = [
108
125
  options.binaryPath,
126
+ ...resumePrefix,
109
127
  '--model', resolvedModel,
110
128
  ];
111
129
  if (isLocal) {
@@ -117,18 +135,6 @@ const codexCliBuilder = (options) => {
117
135
  else {
118
136
  argv.push('--dangerously-bypass-approvals-and-sandbox');
119
137
  }
120
- // Codex's `resume` is a subcommand (`codex resume <id>`), not a flag.
121
- // For the interactive launch path, callers who want to resume should
122
- // use the subcommand form; we keep the flag-style behavior off for
123
- // now since the legacy v0.x Claude code passes `--resume <id>` flat
124
- // and we want consistent argv shape. Resume support for Codex lands
125
- // when the topic-resume map is generalized.
126
- if (options.resumeSessionId) {
127
- // Best-effort: pass the id as the first non-flag positional under
128
- // the hood would require the `resume` subcommand. For now, skip
129
- // resume for Codex and start fresh; the warning helps users notice.
130
- console.warn(`[frameworkSessionLaunch] Codex resume requested (id=${options.resumeSessionId}) but codex CLI's "resume" is a subcommand, not a flag — starting fresh. Will be supported when TopicResumeMap is generalized.`);
131
- }
132
138
  return {
133
139
  argv,
134
140
  envOverrides: {
@@ -1 +1 @@
1
- {"version":3,"file":"frameworkSessionLaunch.js","sourceRoot":"","sources":["../../src/core/frameworkSessionLaunch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAaH;;;;;;;;;GASG;AACH,MAAM,UAAU,wBAAwB,CACtC,SAAgC,EAChC,WAA+B;IAE/B,IAAI,CAAC,WAAW;QAAE,OAAO,SAAS,CAAC;IACnC,MAAM,GAAG,GAAG,WAAW,CAAC,WAAW,EAAE,CAAC;IAEtC,IAAI,SAAS,KAAK,aAAa,EAAE,CAAC;QAChC,iEAAiE;QACjE,kEAAkE;QAClE,8DAA8D;QAC9D,IAAI,GAAG,KAAK,MAAM;YAAE,OAAO,OAAO,CAAC;QACnC,IAAI,GAAG,KAAK,UAAU;YAAE,OAAO,QAAQ,CAAC;QACxC,IAAI,GAAG,KAAK,SAAS;YAAE,OAAO,MAAM,CAAC;QACrC,OAAO,WAAW,CAAC;IACrB,CAAC;IACD,IAAI,SAAS,KAAK,WAAW,EAAE,CAAC;QAC9B,iEAAiE;QACjE,+DAA+D;QAC/D,4DAA4D;QAC5D,0DAA0D;QAC1D,6DAA6D;Q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gEAAgE;YAChE,6CAA6C;YAC7C,UAAU,EAAE,EAAE;SACf;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAmD;IACxE,aAAa,EAAE,yBAAyB;IACxC,WAAW,EAAE,uBAAuB;CACrC,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,mBAAmB,CACjC,SAAgC,EAChC,OAA8B;IAE9B,MAAM,OAAO,GAAG,iBAAiB,CAAC,SAAS,CAAC,CAAC;IAC7C,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,wDAAwD,SAAS,GAAG,CAAC,CAAC;IACxF,CAAC;IACD,OAAO,OAAO,CAAC,OAAO,CAAC,CAAC;AAC1B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "instar",
3
- "version": "0.28.114",
3
+ "version": "0.28.115",
4
4
  "description": "Persistent autonomy infrastructure for AI agents",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "$schema": "./builtin-manifest.schema.json",
3
3
  "schemaVersion": 1,
4
- "generatedAt": "2026-05-18T23:59:04.056Z",
5
- "instarVersion": "0.28.114",
4
+ "generatedAt": "2026-05-19T01:01:48.104Z",
5
+ "instarVersion": "0.28.115",
6
6
  "entryCount": 189,
7
7
  "entries": {
8
8
  "hook:session-start": {
@@ -0,0 +1,38 @@
1
+ # Upgrade Guide — v1.0.1
2
+
3
+ <!-- bump: patch -->
4
+
5
+ ## What Changed
6
+
7
+ Codex topics now actually resume into their prior session when one has been tracked. Before this release, the launch helper recognized that a topic had a tracked Codex session id but logged a warning and started fresh anyway — the resume id was thrown away. After this release, the helper rebuilds argv with `codex resume <SESSION_ID>` as a subcommand inserted right after the binary path, with all the usual sandbox / model / `--oss --local-provider` flags accepted by the `resume` subcommand verbatim.
8
+
9
+ The implementation is in `src/core/frameworkSessionLaunch.ts` (codexCliBuilder). One small refactor: `resumePrefix` is built first (either `['resume', <id>]` when resuming, or empty for fresh), then spread into argv between the binary path and `--model`. The prior warning is removed. Codex's flag-style `--resume` was never accepted by the binary in the first place; the new shape matches what `codex resume --help` documents on Codex 0.130.
10
+
11
+ Stale-id handling: if the tracked SESSION_ID no longer exists in Codex's session store, `codex resume` exits non-zero at startup and the tmux pane shows an error. SessionManager's respawn logic catches the dead pane, and the route handler can clear the stale resume id (same pattern PR #248 established for framework swaps clearing resume ids whose scheme no longer matches the new framework).
12
+
13
+ In capability-matrix terms (from `specs/instar-foundations/required-primitives-inventory.md` once it lands on main), this shifts primitive #7 Session-resume on Codex from `partial ⚠️` to `native ✓`.
14
+
15
+ ## What to Tell Your User
16
+
17
+ - "Codex sessions you've been chatting with now actually pick up where they left off after a restart. Before, restarts silently started a fresh session and lost the conversation thread."
18
+ - "No action needed. Topics that were tracked with a Codex session id will resume the next time they restart."
19
+
20
+ ## Summary of New Capabilities
21
+
22
+ | Capability | How to Use |
23
+ |-----------|-----------|
24
+ | Codex session resume | Automatic — when a topic has a tracked Codex session id, launch uses `codex resume <id>` as a subcommand |
25
+
26
+ ## Evidence
27
+
28
+ The bug was reproducible: any Codex topic that had a tracked session id and got respawned (manually, via /restart, or via lifeline recovery) logged a `console.warn` about Codex resume being a subcommand and started fresh — the user's conversation history in that session was gone from Codex's view (Instar's topic history was still there, but the model lost continuity).
29
+
30
+ Unit tests confirm the new argv shape:
31
+
32
+ - `resume <id>` inserted at positions 1 and 2 of argv when `resumeSessionId` is set
33
+ - No `resume` token in argv when `resumeSessionId` is absent (fresh launch unchanged)
34
+ - Sandbox flags (`--sandbox`, `--ask-for-approval`, `--dangerously-bypass-approvals-and-sandbox`) preserved when resuming
35
+ - Local-model flags (`--oss`, `--local-provider`) preserved when resuming
36
+ - The flag-style `--resume` is never emitted (Codex doesn't accept it)
37
+
38
+ Test file: `tests/unit/frameworkSessionLaunch.test.ts` (38/38 passing — 4 new tests in the codex-cli describe block, 1 prior test updated from "should-not-resume-because-not-supported" to "should-insert-subcommand"). Typecheck: clean.
@@ -0,0 +1,84 @@
1
+ # Side-Effects Review — Codex session-resume via subcommand
2
+
3
+ **Version / slug:** `feat-codex-session-resume` (v0.28.115)
4
+ **Date:** 2026-05-18
5
+ **Author:** Echo
6
+
7
+ ## Summary of the change
8
+
9
+ When `frameworkSessionLaunch.buildInteractiveLaunch('codex-cli', { resumeSessionId })` was called with a session id, the prior implementation logged a console warning and started a fresh session — Codex's `--resume` flag was never accepted. New implementation inserts `resume <SESSION_ID>` as a subcommand right after the binary path. All flags (`--model`, `--sandbox`, `--ask-for-approval`, `--dangerously-bypass-approvals-and-sandbox`, `--oss`, `--local-provider`) continue to be appended; they are accepted by the `codex resume` subcommand identically to a fresh `codex` invocation (verified against `codex resume --help` on Codex 0.130).
10
+
11
+ **Files changed (source):**
12
+ - `src/core/frameworkSessionLaunch.ts` — codexCliBuilder restructured to insert `resume <id>` prefix when resuming; warning removed; JSDoc updated.
13
+
14
+ **Files changed (tests):**
15
+ - `tests/unit/frameworkSessionLaunch.test.ts` — 1 existing test updated, 3 new tests added.
16
+
17
+ **Files changed (release notes):**
18
+ - `upgrades/NEXT.md` — v0.28.115 release notes.
19
+ - `package.json` — version bump 0.28.114 → 0.28.115.
20
+
21
+ ## Decision-point inventory
22
+
23
+ - **Argv shape when resuming**: `[binary, 'resume', id, '--model', ..., ...sandbox]` vs `[binary, '--model', ..., 'resume', id, ...sandbox]` — chose the former because `resume` is a subcommand-style invocation in Codex's CLI grammar; subcommands must come before option flags. Verified via `codex resume --help` accepting the same options.
24
+ - **Whether to pass `--model` when resuming** — yes. Codex's `resume` subcommand accepts `--model`; the original session's model might be retired or unavailable on the current auth path. Passing the configured model overrides safely (Codex documents this as supported).
25
+ - **Whether to validate the session id exists before launch** — no. Pre-validating would couple this helper to Codex's on-disk session layout (`~/.codex/sessions/YYYY/MM/DD/<uuid>.json`) and any change to that layout would break us. Instead, rely on Codex's own startup-time error reporting via the tmux pane + SessionManager's existing dead-pane respawn logic.
26
+ - **Whether to clear stale resume ids on detected failure** — out of scope here. PR #248 established the pattern for the route handler (`/route` cmd clears resume ids on framework swap); a separate "Codex resume id stale" detection path can reuse the same `_topicResumeMap.remove(topicId)` pattern. Tracked but not in this PR.
27
+
28
+ ## 1. Over-block
29
+
30
+ None. The change makes resume actually work where it was previously silently disabled.
31
+
32
+ ## 2. Under-block
33
+
34
+ None. The launch helper has no gating responsibility; it only constructs argv.
35
+
36
+ ## 3. Level-of-abstraction fit
37
+
38
+ Correct. Change lives entirely in the framework-specific builder for codex-cli. `buildInteractiveLaunch` dispatch and the claude-code builder are untouched. The shared `InteractiveLaunchOptions` shape is unchanged — `resumeSessionId` was already part of the contract.
39
+
40
+ ## 4. Signal vs authority
41
+
42
+ Not applicable — pure argv construction. No LLM gate, no policy decision.
43
+
44
+ ## 5. Interactions
45
+
46
+ - **SessionManager.spawnInteractiveSession** — consumer of the launch spec. Receives the new argv shape transparently. No code change needed there.
47
+ - **TopicResumeMap** — already stores Codex session ids per topic; was previously written to but the resume path ignored them. Now actually consumed. No store change needed.
48
+ - **`/route` framework-swap path** — already clears resume ids on framework swap (PR #248); behavior unchanged.
49
+ - **Claude Code builder** — independent codepath, untouched.
50
+ - **codexCliBuilder used by buildHeadlessLaunch** — `buildHeadlessLaunch` uses a different builder path (`codex exec --json ...`); not affected by this change. Headless resume on Codex is a separate question.
51
+
52
+ ## 6. External surfaces
53
+
54
+ - **Public API**: `InteractiveLaunchOptions.resumeSessionId` still accepts a string; semantics changed from "logged + ignored on codex" to "actually used."
55
+ - **CLI surface**: None directly.
56
+ - **Process surface (the actual side-effect)**: A Codex tmux session for a topic with a tracked resume id now spawns as `codex resume <uuid> --model ... --dangerously-bypass-approvals-and-sandbox` instead of `codex --model ... --dangerously-bypass-approvals-and-sandbox`. Process arguments visible in `ps`/tmux capture-pane change accordingly.
57
+
58
+ ## 7. Rollback cost
59
+
60
+ Trivial. Revert the commit:
61
+ - argv returns to fresh-launch shape
62
+ - The warning re-appears
63
+ - Sessions silently start fresh again (the prior bug)
64
+
65
+ No persistent state migration, no data loss. Existing tracked Codex session ids in `TopicResumeMap` remain valid — Codex stores them indefinitely (within reason); they'll just stop being consumed.
66
+
67
+ ## Tests
68
+
69
+ - Updated: `tests/unit/frameworkSessionLaunch.test.ts` — 1 test renamed and inverted (was "does NOT pass --resume because subcommand not supported", now "inserts `resume <id>` as a subcommand right after the binary"); 3 new tests added covering fresh launch is unchanged, sandbox flags preserved when resuming, `--oss --local-provider` preserved when resuming a local-model session.
70
+ - Total: 38/38 in `tests/unit/frameworkSessionLaunch.test.ts`. Typecheck (`tsc --noEmit`) clean.
71
+
72
+ ## Evidence
73
+
74
+ The bug was reproducible by tracing the prior code path: any topic with a stored Codex session id that respawned would log:
75
+
76
+ ```
77
+ [frameworkSessionLaunch] Codex resume requested (id=<uuid>) but codex CLI's "resume" is a subcommand, not a flag — starting fresh.
78
+ ```
79
+
80
+ …and start a fresh session. The user's prior conversation context in that Codex session was therefore not restored even though the id was tracked.
81
+
82
+ After the fix, the same code path produces argv that begins with `[binary, 'resume', <uuid>]`. The shape was verified against `codex resume --help` on Codex 0.130, which documents `[SESSION_ID]` as a positional argument and accepts `--model`, `--sandbox`, `-a/--ask-for-approval`, `--dangerously-bypass-approvals-and-sandbox`, `--oss` as options.
83
+
84
+ Live end-to-end verification (a real Codex resume successfully recovering a real prior session's context) is queued as a follow-up that needs a Codex agent with a session that has built up context. The argv-shape correctness is verifiable via unit tests; the model's actual continuity-of-context depends on Codex's session store correctness, which is Codex's responsibility, not Instar's.