throughline 0.8.3 → 0.8.4
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/CHANGELOG.md +13 -1
- package/README.md +5 -2
- package/codex/skills/throughline/SKILL.md +19 -4
- package/docs/04_public_release_plan.md +1 -0
- package/docs/05_codex_first_roadmap.md +4 -4
- package/docs/06_codex_trim_rollback_fix_plan.md +3 -2
- package/docs/09_rollback_context_trim_insight.md +1 -1
- package/package.json +1 -1
- package/src/cli/codex-handoff-start.mjs +20 -1
- package/src/cli/codex-handoff-start.test.mjs +26 -0
- package/src/cli/install.test.mjs +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,17 @@ shipped to npm but were not individually tagged on GitHub.
|
|
|
10
10
|
|
|
11
11
|
## [Unreleased]
|
|
12
12
|
|
|
13
|
+
## [0.8.4] — 2026-07-20
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- The installed Codex skill now selects Desktop, VS Code, or CLI from the
|
|
18
|
+
current Codex surface and passes an explicit `--open-host` value. A command
|
|
19
|
+
launched through an older persistent PTY can no longer silently redirect a
|
|
20
|
+
Desktop handoff to the PTY's inherited VS Code or Terminal host.
|
|
21
|
+
- `codex-handoff-start` now reports both requested and resolved open hosts in
|
|
22
|
+
JSON and text output while retaining the existing `openHost` field.
|
|
23
|
+
|
|
13
24
|
## [0.8.3] — 2026-07-20
|
|
14
25
|
|
|
15
26
|
### Fixed
|
|
@@ -1133,7 +1144,8 @@ two attempts, instrument first instead of patching again.
|
|
|
1133
1144
|
|
|
1134
1145
|
---
|
|
1135
1146
|
|
|
1136
|
-
[Unreleased]: https://github.com/kitepon-rgb/Throughline/compare/v0.8.
|
|
1147
|
+
[Unreleased]: https://github.com/kitepon-rgb/Throughline/compare/v0.8.4...HEAD
|
|
1148
|
+
[0.8.4]: https://github.com/kitepon-rgb/Throughline/compare/v0.8.3...v0.8.4
|
|
1137
1149
|
[0.8.3]: https://github.com/kitepon-rgb/Throughline/compare/v0.8.2...v0.8.3
|
|
1138
1150
|
[0.8.2]: https://github.com/kitepon-rgb/Throughline/compare/v0.8.1...v0.8.2
|
|
1139
1151
|
[0.8.1]: https://github.com/kitepon-rgb/Throughline/compare/v0.8.0...v0.8.1
|
package/README.md
CHANGED
|
@@ -569,7 +569,10 @@ reminds you to pipe the same memo when using them separately. Add `--execute`
|
|
|
569
569
|
to create a new Codex app-server thread, inject the handoff memory as a
|
|
570
570
|
developer item, and open it with `--open-host auto|desktop|vscode|cli|none`. `auto`
|
|
571
571
|
opens the new task in Codex Desktop when invoked there, while preserving the
|
|
572
|
-
existing VS Code and CLI routes. The
|
|
572
|
+
existing VS Code and CLI routes. The result reports both the requested and
|
|
573
|
+
resolved host. The installed `$throughline` skill passes the current Codex
|
|
574
|
+
surface explicitly so a persistent shell or PTY cannot redirect the handoff.
|
|
575
|
+
The
|
|
573
576
|
individual commands remain available: validate the fresh-thread handoff with
|
|
574
577
|
`throughline codex-handoff-smoke --session codex:<thread-id>`, optionally audit
|
|
575
578
|
the model-smoke boundary with
|
|
@@ -787,7 +790,7 @@ aggregate は collection が既定OFFで、canonical dotagents config の
|
|
|
787
790
|
| `throughline codex-summarize --session codex:<id>` | Summarize captured Codex L2 into L1 with the Codex CLI backend |
|
|
788
791
|
| `throughline codex-resume --session codex:<id>` | Render Codex active-work context from a captured Codex session |
|
|
789
792
|
| `throughline codex-resume --session codex:<id> --format handoff` | Render a concise fresh-thread handoff prompt without mutating the current thread |
|
|
790
|
-
| `throughline codex-handoff-start --session codex:<id>` | Guided start plan for moving handoff memory into a new Codex thread; add `--execute` to create the thread through app-server, inject developer memory, and open it with `--open-host auto\|desktop\|vscode\|cli\|none`;
|
|
793
|
+
| `throughline codex-handoff-start --session codex:<id>` | Guided start plan for moving handoff memory into a new Codex thread; add `--execute` to create the thread through app-server, inject developer memory, and open it with `--open-host auto\|desktop\|vscode\|cli\|none`; output includes requested and resolved host, and the installed `$throughline` skill passes the current Codex surface explicitly; use `--print-prompt` to include the prompt and `--memo-stdin` to carry a current-work memo |
|
|
791
794
|
| `throughline codex-handoff-smoke --session codex:<id>` | Read-only validation that the fresh-thread handoff prompt is pasteable before starting a new thread |
|
|
792
795
|
| `throughline codex-handoff-model-smoke --session codex:<id>` | Experimental marker smoke for the handoff prompt. `--dry-run` checks readiness / command boundary without starting Codex exec; `--memo-stdin` carries a current-work memo; live `codex exec --ephemeral --sandbox read-only` requires explicit env opt-in |
|
|
793
796
|
| `throughline codex-visibility-smoke --session codex:<id>` | Experimental Codex app-server marker smoke; injects memory and starts a model turn |
|
|
@@ -25,6 +25,17 @@ not ask for confirmation. Execute the handoff-start command directly. If it
|
|
|
25
25
|
fails, report the error plainly instead of silently falling back to another
|
|
26
26
|
memory source or current-thread rollback.
|
|
27
27
|
|
|
28
|
+
Choose the open host from the current Codex application surface, not from
|
|
29
|
+
environment variables inherited by the shell or a persistent PTY. Pass it
|
|
30
|
+
explicitly whenever the surface is known:
|
|
31
|
+
|
|
32
|
+
- Codex Desktop: `--open-host desktop`
|
|
33
|
+
- Codex in VS Code: `--open-host vscode`
|
|
34
|
+
- Codex CLI: `--open-host cli`
|
|
35
|
+
|
|
36
|
+
Use `--open-host auto` only when the Codex surface is genuinely unknown. In
|
|
37
|
+
that case, report both the requested and resolved hosts from the CLI result.
|
|
38
|
+
|
|
28
39
|
## Common Requests
|
|
29
40
|
|
|
30
41
|
### Bare "$throughline" / "use Throughline"
|
|
@@ -32,9 +43,13 @@ memory source or current-thread rollback.
|
|
|
32
43
|
Run:
|
|
33
44
|
|
|
34
45
|
```bash
|
|
35
|
-
throughline codex-handoff-start --execute
|
|
46
|
+
throughline codex-handoff-start --execute --open-host desktop
|
|
36
47
|
```
|
|
37
48
|
|
|
49
|
+
The example above is for Codex Desktop. Replace `desktop` with `vscode` or
|
|
50
|
+
`cli` when that is the current Codex surface. Do not copy the host identity
|
|
51
|
+
from the shell or PTY that happens to execute the command.
|
|
52
|
+
|
|
38
53
|
This is the Codex new-thread continuation flow. It does not mutate the current
|
|
39
54
|
Codex thread. Report the new thread id, open status, and any manual resume
|
|
40
55
|
command if the host could not be opened automatically.
|
|
@@ -80,7 +95,7 @@ If the user wants to continue in a fresh Codex thread instead of mutating the
|
|
|
80
95
|
current thread, use:
|
|
81
96
|
|
|
82
97
|
```bash
|
|
83
|
-
throughline codex-handoff-start --session codex:<current-thread-id> --execute
|
|
98
|
+
throughline codex-handoff-start --session codex:<current-thread-id> --execute --open-host <current-codex-surface>
|
|
84
99
|
```
|
|
85
100
|
|
|
86
101
|
If the user gave a current-work memo, pipe it with `--memo-stdin`. This starts a
|
|
@@ -106,7 +121,7 @@ memory, unless they explicitly ask to mutate the current Codex thread.
|
|
|
106
121
|
Execute:
|
|
107
122
|
|
|
108
123
|
```bash
|
|
109
|
-
throughline codex-handoff-start --execute
|
|
124
|
+
throughline codex-handoff-start --execute --open-host <current-codex-surface>
|
|
110
125
|
```
|
|
111
126
|
|
|
112
127
|
Report only the essential outcome, especially the new thread id and open status.
|
|
@@ -120,7 +135,7 @@ throughline trim --dry-run --host codex
|
|
|
120
135
|
Safe new-thread continuation:
|
|
121
136
|
|
|
122
137
|
```bash
|
|
123
|
-
throughline codex-handoff-start --session codex:<current-thread-id> --execute --json
|
|
138
|
+
throughline codex-handoff-start --session codex:<current-thread-id> --execute --open-host <current-codex-surface> --json
|
|
124
139
|
```
|
|
125
140
|
|
|
126
141
|
Report the context reduction estimate from the dry-run when present:
|
|
@@ -140,6 +140,7 @@ schema v4 で PostToolUse (`capture-tool`) は廃止、L2/L3 は Stop 内で一
|
|
|
140
140
|
| **npm 公開 (v0.6.1): Spotter auditor context projection** | `throughline auditor-context`を追加。exact session/projectと最新完了L2 pairのorigin/turn/hash freshnessを検査し、fresh時だけbounded user/assistant本文をversioned JSONで返す。DBはread-onlyで開き、作成・migration・WAL書き込みをしない。Spotter側はproject opt-inでのみ利用する。580 tests、CI 6/6、pack scan、registry global install / doctorを通過し、npm / tag / GitHub Releaseを2026-07-13に公開した |
|
|
141
141
|
| **npm 公開 (v0.6.2): factory diagnostics + local runtime error store** | `throughline factory-diagnostics --json` と `throughline runtime-errors ... --json` を追加。collection は canonical dotagents config の `collection.enabled: true` が明示された時だけ有効で既定OFF、store は network I/O を行わない。公開commit `e6ce6e3`、CI `29238704750`、npm `latest`、tag / GitHub Release、registry由来隔離installと診断snapshotを2026-07-13に確認した |
|
|
142
142
|
| **npm 公開 (v0.6.3): Codex diagnostics ready 集約 + Windows bounded observer** | 3 managed Codex hooks が canonical `ready` のとき hook summary / Codex connector を `ready` とし、未検査 Claude connector は明示 `unverified` のまま Codex-only overall から除外する。Windows runtime-error observer は、既存 state の使用前検証と新規 file の ACL 付与・read-back を維持しつつ、同一 mutation 内の重複 PowerShell ACL 検証を除いた。公開commit `fc83ddf`、CI `29284655280`(9/9 green)、npm `throughline@0.6.3`、tag / GitHub Release、npm shasum `4f3fcd2598a75f026358dae7f3eb3165242b580b` を2026-07-14に確認した |
|
|
143
|
+
| **release candidate (v0.8.4): Codex handoff host境界の明示化** | `$throughline` skillは現在のCodex UI surfaceからDesktop/VS Code/CLIを選び、`--open-host`を明示する。shell/永続PTYの継承環境はsurface判定に使わない。`codex-handoff-start`は互換の`openHost`を残し、requested / resolved hostをJSONとtextで報告する。古いVS Code由来PTY事故形と配布skillをfocused testで固定し、Claude-facing hook/`/tl`/baton/resume契約は変更しない。公開実績はpush後CI、npm、tag / GitHub Release、registry由来global installの確認後に追記する |
|
|
143
144
|
| **未リリース: Codex current-session 75% trigger** | Codex 自動発火を token-monitor に依存させず、global install が Codex `UserPromptSubmit` / `PostToolUse` hooks も登録する。hook は当該 Codex session の rollout `token_count` を直接読み、verified 75% 以上なら同じ user turn または tool loop 継続前に `$throughline` workflow 実行指示を `additionalContext` で注入する。Stop hook の guarded auto-refresh は残す。`~/.codex/config.toml` は旧 `codex_hooks = true` に加えて現行 `hooks = true` も有効化する |
|
|
144
145
|
| **グローバル E2E 検証** | 2026-04-17 別ディレクトリから `throughline doctor` 全緑を確認 |
|
|
145
146
|
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
- Claude-primary の現行 L2 -> L1 要約は `codex-sidecar` が configured の場合に sidecar を優先し、使えない場合は Claude Haiku 経路に戻る。Codex-primary は Codex CLI backend 失敗を明示 error にし、Claude Haiku / raw L2 へ fallback しない。
|
|
29
29
|
- Codex guarded trim は、Codex app-server の `thread/read` / `thread/resume` / `thread/rollback` / `thread/inject_items` を使う。明示 thread identity と injectable memory がない場合は mutation 前に拒否する。rollout/app-server turn count mismatch は診断に残し、`thread/read` / `thread/resume` が同じ count を返す場合は app-server 側の差分で rollback `numTurns` を補正する。
|
|
30
30
|
- Claude `/rewind` 自動化はまだ有効化しない。
|
|
31
|
-
- 2026-05-10 update: Codex automatic current-thread refresh mutation は無効化する。live rollback / inject で token_count が一時的に落ちても同一 thread で戻る実測があるため、`UserPromptSubmit` / `PostToolUse` / `Stop` hooks は capture / monitor state write のみ行い、`codex_auto_refresh_disabled` で quiet にする。bare `$throughline` は `codex-handoff-start --execute
|
|
31
|
+
- 2026-05-10 update: Codex automatic current-thread refresh mutation は無効化する。live rollback / inject で token_count が一時的に落ちても同一 thread で戻る実測があるため、`UserPromptSubmit` / `PostToolUse` / `Stop` hooks は capture / monitor state write のみ行い、`codex_auto_refresh_disabled` で quiet にする。bare `$throughline` は `codex-handoff-start --execute --open-host <current-codex-surface>` による app-server 新スレッド handoff とし、明示 `trim --execute --host codex` だけを診断用 current-thread rollback / inject path として残す。current surfaceはCodex UI contextから決め、shell/永続PTYの継承環境へ委ねない。
|
|
32
32
|
|
|
33
33
|
## 新セッション引き継ぎ
|
|
34
34
|
|
|
@@ -271,7 +271,7 @@ Phase 3 implementation result (2026-05-06):
|
|
|
271
271
|
- [x] `throughline codex-resume --format handoff` は current thread を mutate せず、新規 Codex thread に貼る短い handoff prompt を返す。handoff view は L2 件数 / 本文長 / detail refs を cap し、full active-work context は通常 text renderer に残す。
|
|
272
272
|
- [x] `throughline codex-handoff-smoke --session codex:<thread_id>` は新規 thread handoff prompt を read-only に検査し、prompt size / required sections / mutation boundary / detail command dedupe を固定する。
|
|
273
273
|
- [x] `throughline codex-handoff-model-smoke --session codex:<thread_id>` は明示 opt-in 時だけ `codex exec --ephemeral --ignore-user-config --ignore-rules --sandbox read-only` で handoff prompt の marker model smoke を行う。`--dry-run` は env なしで readiness / command boundary を監査し、`--print-prompt` で結合 prompt を出せる。`--memo-stdin` で Codex-primary current-work memo も同じ prompt に含める。structural handoff smoke が ready でなければ拒否し、current thread は mutate しない。
|
|
274
|
-
- [x] `throughline codex-handoff-start --session codex:<thread_id>` は safe continuation の guided entrypoint として、structural smoke / model smoke dry-run / handoff render / optional live smoke / `--print-prompt` をまとめて表示する。`--execute` では app-server `thread/start` + `thread/inject_items` で新 thread に developer memory を注入し、`--open-host auto|desktop|vscode|cli|none`
|
|
274
|
+
- [x] `throughline codex-handoff-start --session codex:<thread_id>` は safe continuation の guided entrypoint として、structural smoke / model smoke dry-run / handoff render / optional live smoke / `--print-prompt` をまとめて表示する。`--execute` では app-server `thread/start` + `thread/inject_items` で新 thread に developer memory を注入し、`--open-host auto|desktop|vscode|cli|none` で表示を開く。CLIはrequested / resolved hostを両方報告する。`auto` は Codex Desktop 起点(`CODEX_INTERNAL_ORIGINATOR_OVERRIDE="Codex Desktop"` または `__CFBundleIdentifier=com.openai.codex`)を CLI より先に識別するが、bare `$throughline` skillは現在のCodex UI surfaceを明示指定し、永続PTYの継承環境へhost選択を委ねない。Desktop の `codex://threads/<thread-id>` deep linkとVS Code / CLI の既存経路は維持する。`--memo-stdin` 時は replay 用コマンドにも `--memo-stdin` を伝播し、same memo を pipe する注意を出す。
|
|
275
275
|
- [x] `throughline codex-resume --format item-json` は Codex developer message item JSON を返す。
|
|
276
276
|
- [x] `codex-resume` は explicit session を受け取れる。省略時は cwd の最新 `codex:%` session だけを対象にし、Claude session を混ぜない。
|
|
277
277
|
- [x] `src/codex-handoff.test.mjs` / `src/codex-resume.test.mjs` で renderer と CLI shape を固定した。
|
|
@@ -440,7 +440,7 @@ Phase 5 implementation status (2026-05-06):
|
|
|
440
440
|
- [x] `doctor --codex` は Claude settings を変更しない。Codex primary entrypoint の診断に限定する。
|
|
441
441
|
- [x] 実セッションで `doctor --codex` -> `codex-capture` -> `codex-resume --format item-json` -> `doctor --codex` の local smoke を実施した。`codex-resume` は developer message item JSON を描画し、再診断で captured DB session が 1 件として表示された。
|
|
442
442
|
- [x] 実セッションで `codex-visibility-smoke` を実施した。`THROUGHLINE_EXPERIMENTAL_CODEX_MODEL_VISIBLE_SMOKE=1` を必須にし、長い model turn に備えて `--request-timeout-ms 150000` / `--timeout-ms 180000` を使えるようにした。
|
|
443
|
-
- [x] Codex primary の setup / install 手順は README に記録した。global install は Codex hooks と `$throughline` skill を自動登録する。2026-05-10 以降、bare `$throughline` は `throughline codex-handoff-start --execute
|
|
443
|
+
- [x] Codex primary の setup / install 手順は README に記録した。global install は Codex hooks と `$throughline` skill を自動登録する。2026-05-10 以降、bare `$throughline` は `throughline codex-handoff-start --execute --open-host <current-codex-surface>` による app-server 新スレッド handoffとし、current surfaceはCodex UI contextから明示する。hooks は capture / monitor state write だけを行い、current-thread rollback / inject は明示 `trim --execute --host codex` を要求された時だけ使う。
|
|
444
444
|
- [x] `codex-summarize` を明示診断・運用 flow に追加した。Codex CLI backend を使い、Claude Haiku へ fallback しない。
|
|
445
445
|
- [x] Codex primary の summarize / guarded execute まで含む end-to-end smoke を実施した。2026-05-07 correction では guarded execute を live app-server smoke としてのみ扱った。2026-05-08 unblock 後は、controlled rollback model-visible smoke の `not-reproduced` と current-thread live run の `execute-durable-verified` を合わせて、Codex current-thread trim 完了条件に含める。
|
|
446
446
|
- `codex-capture`: `capturedTurns = 41`, `capturedRows = 75`, `capturedDetails = 2424`
|
|
@@ -460,7 +460,7 @@ Phase 5 implementation status (2026-05-06):
|
|
|
460
460
|
- 追加確認: current VSCode-origin parent thread `019dfd38-c530-71c3-b7b8-180bdd3054bc` は hook shape 変更前に開始していたため、変更後の自然 Stop smoke としては不適格。assistant final 後に rollout は `task_complete` まで進んだが latest DB session は exec child のままだった。次に VSCode-origin を見る場合は、hook shape 変更後に新しく開始した Codex session で確認する。
|
|
461
461
|
- 最終確認: hook shape 変更後に新しく開始した VSCode-origin Codex session で 1 turn 完了後、`throughline doctor --codex` を実行した。`current Codex thread` は `019dfd62-9a9d-7211-bf91-89d8e3fc908e`、`latest DB session` は `codex:019dfd62-9a9d-7211-bf91-89d8e3fc908e` で一致し、`Codex hooks feature: enabled`、`Codex Stop hook: registered`、command は `/usr/bin/node /home/kite/projects/Throughline/bin/throughline.mjs codex-hook stop`、`async: false`、`timeoutSec: 300` だった。VSCode-origin の自然 Stop hook による DB capture も解決済みとして扱う。
|
|
462
462
|
- historical 2026-05-07 correction: 以下の Codex trim smoke は live app-server primitive の履歴として残す。ただし 2026-05-06 incident 後、restart / reconnect 越しの durable context trim 成功とは一時的に扱わず、`$throughline` / Codex Stop hook の automatic mutation を止めていた。
|
|
463
|
-
- 2026-05-10 UX 修正: bare `$throughline` は `doctor --codex` / `trim --dry-run --all` / `trim --preflight --all` を AI に順番実行させる説明 surface でも、`trim --execute --host codex --all` を直接実行する current-thread refresh でもなく、`throughline codex-handoff-start --execute
|
|
463
|
+
- 2026-05-10 UX 修正: bare `$throughline` は `doctor --codex` / `trim --dry-run --all` / `trim --preflight --all` を AI に順番実行させる説明 surface でも、`trim --execute --host codex --all` を直接実行する current-thread refresh でもなく、`throughline codex-handoff-start --execute --open-host <current-codex-surface>` による app-server 新スレッド handoff とする。current surfaceはCodex UI contextから明示し、current-thread rollback / inject は明示要求時だけ使う。
|
|
464
464
|
- memory contract 修正: Codex guarded trim でも注入 memory は元の `/tl` 思想を正とする。古い turn は L1 summaries、直近 20 turn は L2 full bodies、L3 は reference only で、L3 bodies / tool payloads は注入しない。rollout source は rollback candidate と app-server turn-count 補正の根拠であり、Throughline DB memory がある場合に rollout active work preview を注入 memory として使わない。DB memory が無い execute は rollout preview を注入せず、mutation 前に拒否する。
|
|
465
465
|
- doctor visibility 修正: `doctor --codex` は旧 context refresh readiness として rollback source、inject memory source、memory contract、L1 summaries / recent L2 bodies / L3 references-only count、heuristic reduction estimate を表示していた。実 thread `019dfd62-9a9d-7211-bf91-89d8e3fc908e` では live readiness として `context refresh: ready`、`rollback source: codex-rollout`、`inject memory source: throughline-db`、`memory contract: older L1 + latest 20 L2 full bodies + L3 references only` を確認した。ただし incident 後は restart-safe readiness ではない。
|
|
466
466
|
- 削減量の記録: `trim --dry-run --host codex` は rollout text がある場合に `contextReductionEstimate` を返す。2026-05-06 の現在 thread `019dfd62-9a9d-7211-bf91-89d8e3fc908e` では通常 keep-recent preview だと `capturedTurns = 14` / `keepRecent = 20` のため `rollbackTurns = 0`、推定削減量も 0 だった。旧 bare `$throughline` context refresh は `--all` を使っていたため、この keep-recent preview の 0 は「Codex で削減できない」という意味ではない。
|
|
@@ -25,8 +25,9 @@ count を返す場合は、その差分で rollback `numTurns` を補正しま
|
|
|
25
25
|
一時的に下がっても同一 thread で戻る挙動を確認したため、Codex automatic
|
|
26
26
|
current-thread refresh は無効化します。`UserPromptSubmit` / `PostToolUse` / `Stop`
|
|
27
27
|
hooks は capture / monitor state write のみ行い、`codex_auto_refresh_disabled` で
|
|
28
|
-
quiet にします。bare `$throughline` は
|
|
29
|
-
|
|
28
|
+
quiet にします。bare `$throughline` は
|
|
29
|
+
`codex-handoff-start --execute --open-host <current-codex-surface>` による
|
|
30
|
+
app-server 新スレッド handoff とし、surfaceはCodex UI contextから明示します。
|
|
30
31
|
|
|
31
32
|
最初のインシデント仮説に対する重要な訂正:
|
|
32
33
|
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
2026-05-09 skill UX: bare `$throughline` は diagnostics / dry-run / preflight を AI に順番実行させる surface ではなく、`throughline trim --execute --host codex --all` を直接走らせる scripted current-thread refresh としていた。目的は rollback と、Throughline DB の L2 最新 20 full bodies + older L1 summaries + L3 references-only memory injection のみだった。2026-05-10 以降は `--json` の full plan / memory preview が tool output として context を再膨張させるため、通常 path では付けないようにした。
|
|
27
27
|
|
|
28
|
-
2026-05-10 rollback UX correction: 追加 live 実験で、current-thread rollback / inject 後に token_count が一時的に下がっても同一 thread で戻る挙動を確認した。これを受け、Codex automatic current-thread refresh は無効化し、`UserPromptSubmit` / `PostToolUse` / `Stop` hooks は capture / monitor state write のみ行う。bare `$throughline` は `throughline codex-handoff-start --execute
|
|
28
|
+
2026-05-10 rollback UX correction: 追加 live 実験で、current-thread rollback / inject 後に token_count が一時的に下がっても同一 thread で戻る挙動を確認した。これを受け、Codex automatic current-thread refresh は無効化し、`UserPromptSubmit` / `PostToolUse` / `Stop` hooks は capture / monitor state write のみ行う。bare `$throughline` は `throughline codex-handoff-start --execute --open-host <current-codex-surface>` による app-server 新スレッド handoffとし、surfaceはCodex UI contextから明示する。明示 `trim --execute --host codex` は診断用 current-thread path として残す。
|
|
29
29
|
|
|
30
30
|
2026-05-07 host primitive audit: `throughline codex-host-primitive-audit` で installed Codex app-server schema を機械監査した。`thread/rollback` / `thread/inject_items` / `thread/compact/start` / `thread/start` / `thread/fork` / `thread/resume` は存在するが、rollback 済み user text を current-thread の model-visible input へ復活させない deletion / isolation / projection primitive は見つからなかった。`thread/resume(history)` は schema 上 `[UNSTABLE] FOR CODEX CLOUD - DO NOT USE` で、`thread_id` も ignored になるため、Throughline の current-thread repair primitive には採用しない。
|
|
31
31
|
|
package/package.json
CHANGED
|
@@ -190,6 +190,8 @@ function buildGuidance({ sessionId, parsed, handoffSmoke, handoffPrompt }) {
|
|
|
190
190
|
]),
|
|
191
191
|
};
|
|
192
192
|
const ready = handoffSmoke.status === 'ready';
|
|
193
|
+
const requestedOpenHost = parsed.openHost;
|
|
194
|
+
const resolvedOpenHost = resolveOpenHost(requestedOpenHost);
|
|
193
195
|
return {
|
|
194
196
|
status: ready ? 'ready' : 'not-ready',
|
|
195
197
|
reason: ready ? 'fresh_thread_handoff_start_ready' : 'handoff_smoke_not_ready',
|
|
@@ -198,6 +200,8 @@ function buildGuidance({ sessionId, parsed, handoffSmoke, handoffPrompt }) {
|
|
|
198
200
|
startThreadManually: !parsed.execute,
|
|
199
201
|
execute: parsed.execute,
|
|
200
202
|
openHost: parsed.openHost,
|
|
203
|
+
requestedOpenHost,
|
|
204
|
+
resolvedOpenHost,
|
|
201
205
|
handoffSmoke,
|
|
202
206
|
modelPromptChars: modelPrompt.length,
|
|
203
207
|
estimatedModelPromptTokens: estimateTokens(modelPrompt),
|
|
@@ -234,7 +238,8 @@ function renderTextResult(result) {
|
|
|
234
238
|
lines.push(` session: ${result.sessionId}`);
|
|
235
239
|
lines.push(` mutates thread: ${result.mutatesCurrentThread ? 'yes' : 'no'}`);
|
|
236
240
|
lines.push(` execute: ${result.execute ? 'yes' : 'no'}`);
|
|
237
|
-
lines.push(` open
|
|
241
|
+
lines.push(` open requested: ${result.requestedOpenHost ?? result.openHost}`);
|
|
242
|
+
lines.push(` open resolved: ${result.resolvedOpenHost ?? result.open?.host ?? result.openHost}`);
|
|
238
243
|
lines.push(` handoff smoke: ${result.handoffSmoke.status}`);
|
|
239
244
|
lines.push(` prompt chars: ${result.handoffSmoke.promptChars}/${result.handoffSmoke.maxPromptChars}`);
|
|
240
245
|
lines.push(` model prompt: ${result.modelPromptChars}`);
|
|
@@ -304,6 +309,8 @@ function openStartedCodexThread({ threadId, host, cwd }) {
|
|
|
304
309
|
status: 'skipped',
|
|
305
310
|
reason: 'open_host_none',
|
|
306
311
|
host: resolvedHost,
|
|
312
|
+
requestedHost: host,
|
|
313
|
+
resolvedHost,
|
|
307
314
|
desktopUrl,
|
|
308
315
|
vscodeUrl,
|
|
309
316
|
resumeCommand,
|
|
@@ -323,6 +330,8 @@ function openStartedCodexThread({ threadId, host, cwd }) {
|
|
|
323
330
|
status: 'failed',
|
|
324
331
|
reason: `${resolvedHost}_deep_link_open_failed`,
|
|
325
332
|
host: resolvedHost,
|
|
333
|
+
requestedHost: host,
|
|
334
|
+
resolvedHost,
|
|
326
335
|
desktopUrl,
|
|
327
336
|
vscodeUrl,
|
|
328
337
|
resumeCommand,
|
|
@@ -333,6 +342,8 @@ function openStartedCodexThread({ threadId, host, cwd }) {
|
|
|
333
342
|
status: 'opened',
|
|
334
343
|
reason: `${resolvedHost}_deep_link_opened`,
|
|
335
344
|
host: resolvedHost,
|
|
345
|
+
requestedHost: host,
|
|
346
|
+
resolvedHost,
|
|
336
347
|
desktopUrl,
|
|
337
348
|
vscodeUrl,
|
|
338
349
|
resumeCommand,
|
|
@@ -355,6 +366,8 @@ end tell
|
|
|
355
366
|
status: 'failed',
|
|
356
367
|
reason: 'terminal_open_failed',
|
|
357
368
|
host: resolvedHost,
|
|
369
|
+
requestedHost: host,
|
|
370
|
+
resolvedHost,
|
|
358
371
|
desktopUrl,
|
|
359
372
|
vscodeUrl,
|
|
360
373
|
resumeCommand,
|
|
@@ -365,6 +378,8 @@ end tell
|
|
|
365
378
|
status: 'opened',
|
|
366
379
|
reason: 'terminal_resume_opened',
|
|
367
380
|
host: resolvedHost,
|
|
381
|
+
requestedHost: host,
|
|
382
|
+
resolvedHost,
|
|
368
383
|
desktopUrl,
|
|
369
384
|
vscodeUrl,
|
|
370
385
|
resumeCommand,
|
|
@@ -374,6 +389,8 @@ end tell
|
|
|
374
389
|
status: 'manual',
|
|
375
390
|
reason: 'cli_auto_open_unsupported_on_platform',
|
|
376
391
|
host: resolvedHost,
|
|
392
|
+
requestedHost: host,
|
|
393
|
+
resolvedHost,
|
|
377
394
|
desktopUrl,
|
|
378
395
|
vscodeUrl,
|
|
379
396
|
resumeCommand,
|
|
@@ -384,6 +401,8 @@ end tell
|
|
|
384
401
|
status: 'failed',
|
|
385
402
|
reason: 'unsupported_open_host',
|
|
386
403
|
host: resolvedHost,
|
|
404
|
+
requestedHost: host,
|
|
405
|
+
resolvedHost,
|
|
387
406
|
desktopUrl,
|
|
388
407
|
vscodeUrl,
|
|
389
408
|
resumeCommand,
|
|
@@ -27,6 +27,21 @@ test('codex-handoff-start auto-selects Codex Desktop before inherited VS Code si
|
|
|
27
27
|
);
|
|
28
28
|
});
|
|
29
29
|
|
|
30
|
+
test('codex-handoff-start does not mistake a stale VS Code PTY for Desktop without a Desktop signal', () => {
|
|
31
|
+
assert.equal(
|
|
32
|
+
_internal.resolveOpenHost('auto', {
|
|
33
|
+
VSCODE_IPC_HOOK_CLI: '/tmp/stale-vscode.sock',
|
|
34
|
+
}),
|
|
35
|
+
'vscode',
|
|
36
|
+
);
|
|
37
|
+
assert.equal(
|
|
38
|
+
_internal.resolveOpenHost('desktop', {
|
|
39
|
+
VSCODE_IPC_HOOK_CLI: '/tmp/stale-vscode.sock',
|
|
40
|
+
}),
|
|
41
|
+
'desktop',
|
|
42
|
+
);
|
|
43
|
+
});
|
|
44
|
+
|
|
30
45
|
test('codex-handoff-start keeps VS Code and CLI auto-open behavior', () => {
|
|
31
46
|
assert.equal(
|
|
32
47
|
_internal.resolveOpenHost('auto', { CODEX_INTERNAL_ORIGINATOR_OVERRIDE: 'codex_vscode' }),
|
|
@@ -149,6 +164,9 @@ test('codex-handoff-start prints guided ready JSON for latest Codex session', as
|
|
|
149
164
|
assert.equal(payload.sessionId, 'codex:thread-handoff-start');
|
|
150
165
|
assert.equal(payload.mutatesCurrentThread, false);
|
|
151
166
|
assert.equal(payload.startThreadManually, true);
|
|
167
|
+
assert.equal(payload.openHost, 'auto');
|
|
168
|
+
assert.equal(payload.requestedOpenHost, 'auto');
|
|
169
|
+
assert.ok(['desktop', 'vscode', 'cli'].includes(payload.resolvedOpenHost));
|
|
152
170
|
assert.equal(payload.memoStdin, false);
|
|
153
171
|
assert.equal(payload.memoReplayNote, null);
|
|
154
172
|
assert.equal(payload.handoffSmoke.status, 'ready');
|
|
@@ -178,6 +196,8 @@ test('codex-handoff-start can print the exact fresh-thread prompt', async () =>
|
|
|
178
196
|
assert.equal(result.status, 0, result.stderr);
|
|
179
197
|
assert.match(result.stdout, /throughline codex handoff start/);
|
|
180
198
|
assert.match(result.stdout, /status:\s+ready/);
|
|
199
|
+
assert.match(result.stdout, /open requested:\s+auto/);
|
|
200
|
+
assert.match(result.stdout, /open resolved:\s+(desktop|vscode|cli)/);
|
|
181
201
|
assert.match(result.stdout, /commands:/);
|
|
182
202
|
assert.match(result.stdout, /## Throughline: New Codex Thread Handoff/);
|
|
183
203
|
assert.match(result.stdout, /latest handoff start body/);
|
|
@@ -284,12 +304,18 @@ test('codex-handoff-start execute creates a new app-server thread and can skip o
|
|
|
284
304
|
assert.equal(payload.status, 'started');
|
|
285
305
|
assert.equal(payload.reason, 'new_thread_handoff_started');
|
|
286
306
|
assert.equal(payload.execute, true);
|
|
307
|
+
assert.equal(payload.openHost, 'none');
|
|
308
|
+
assert.equal(payload.requestedOpenHost, 'none');
|
|
309
|
+
assert.equal(payload.resolvedOpenHost, 'none');
|
|
287
310
|
assert.equal(payload.startThreadManually, false);
|
|
288
311
|
assert.equal(payload.newThread.threadId, '019e2000-0000-7000-8000-000000000001');
|
|
289
312
|
assert.equal(payload.newThread.delivery, 'developer-item');
|
|
290
313
|
assert.equal(payload.newThread.injectSent, true);
|
|
291
314
|
assert.equal(payload.newThread.turnStatus, 'not-started');
|
|
292
315
|
assert.equal(payload.open.status, 'skipped');
|
|
316
|
+
assert.equal(payload.open.host, 'none');
|
|
317
|
+
assert.equal(payload.open.requestedHost, 'none');
|
|
318
|
+
assert.equal(payload.open.resolvedHost, 'none');
|
|
293
319
|
assert.equal(
|
|
294
320
|
payload.open.desktopUrl,
|
|
295
321
|
'codex://threads/019e2000-0000-7000-8000-000000000001',
|
package/src/cli/install.test.mjs
CHANGED
|
@@ -181,6 +181,10 @@ test('global install copies Throughline Codex skill to ~/.codex/skills/', async
|
|
|
181
181
|
assert.match(skillBody, /name: throughline/);
|
|
182
182
|
assert.match(skillBody, /Bare "\$throughline"/);
|
|
183
183
|
assert.match(skillBody, /throughline codex-handoff-start --execute/);
|
|
184
|
+
assert.match(skillBody, /--open-host desktop/);
|
|
185
|
+
assert.match(skillBody, /--open-host vscode/);
|
|
186
|
+
assert.match(skillBody, /--open-host cli/);
|
|
187
|
+
assert.match(skillBody, /not from[\s\S]*persistent PTY/);
|
|
184
188
|
assert.match(skillBody, /do not run doctor \/ dry-run \/ preflight first/);
|
|
185
189
|
assert.match(metadataBody, /start a new Codex thread with Throughline handoff memory/);
|
|
186
190
|
assert.doesNotMatch(metadataBody, /scripted current-thread rollback/);
|