feat(lastcode): add Codex thread tools - #52
Conversation
## Problem Codex can infer LastCode session identity by probing environment variables and SQLite, but there is no supported, bounded way to identify, list, or inspect threads—especially when composing the same operation over SSH. ## Solution - add `t3 thread current|list|read` with stable, bounded JSON output; - materialize a home-pinned `lastcode-thread` wrapper and expose it only to Codex processes on supported POSIX hosts; - inject authoritative LastCode thread/home identity and preserve Codex's provider-native thread identity in the session projection; - use least-privilege authenticated live reads with a bounded offline projection fallback; - document explicit local-first/SSH composition without adding host discovery, MCP, or a broker. This PR is slice 1 of umbrella PR #52. It intentionally contains no thread messaging or waiting behavior. ## Validation - five bounded Luna-high review rounds; final correctness, KISS, and best-practices results are clean; - 231 focused tests passed; - focused lint and server/contracts typechecks passed; - repository pre-push quick CI passed: formatting, workspace typechecks, and all workspace tests. Implemented with GPT-5.6 Sol and reviewed with GPT-5.6 Luna in the Codex harness.
LastCode needs to remain a small personal fork that can run beside T3 Code, follow every upstream nightly without losing its fork commits, and produce optional local ad-hoc-signed builds without relying on hosted CI or an Apple Developer subscription. The fork also needs durable branding and operator documentation that are unlikely to conflict with upstream changes. - isolate LastCode's Electron profile, application IDs, URL schemes, state directory, single-instance lock, and update behavior from T3 Code - add the themed LastCode wordmark, temporary app mark, app icons, and favicons under a fork-owned asset root with dev, nightly, and prod variants - add an exact-commit local CI gate, pre-push quick gate, and guarded squash-merge command - checkpoint every upstream nightly as an immutable `lastcode/checkpoint/<upstream-tag>` tag while rebasing the complete fork stack in an isolated worktree - promote rebased checkpoints to `lastcode/main` only when no pull request is open - require checkpoint-bound full-CI provenance before an ad-hoc macOS build, then emit a manifest, SHA-256 checksums, and a numbered build tag - add an opt-in hourly/login launchd service for checkpoint automation - place LastCode-specific runbooks and conventions under `docs/lastcode/` - sanitize repository-local Git variables from nested Git and CI subprocesses so hooks and temporary-repository tests remain isolated LastCode and T3 Code can run simultaneously. Every upstream nightly can be recorded even when no LastCode build is ready, while selected checkpoints can later become reproducible local releases. Hosted release jobs are disabled for the fork; releases remain deliberate, local, and ad hoc. - exact-commit full local CI passed on `77b716527cd64f7253afe2c71d596d3f1319e769` - all workspace formatting and lint checks passed - all workspace typechecks passed - workspace tests passed, including 1,984 server tests (7 skipped) and 2,004 desktop tests - desktop production build and preload assertions passed - Rust resource-monitor formatting and 15 tests passed - SwiftLint, ktlint, and detekt passed for mobile native sources - release smoke passed from a frozen install - the normal pre-push quick gate passed under Git's hook environment - the LastCode desktop build was launched and manually verified with its sidebar wordmark, menu-bar name, isolated runtime, and app icon Implemented with GPT-5.6-Sol through the Codex harness in T3 Code.
The nightly checkpoint bootstrap stopped before its first rebase because `git worktree add` does not support the `--branch` long option. Use Git's documented `-b <new-branch>` syntax and cover the exact command arguments so the automation remains compatible with the installed Git CLI. Validation: - scripts package: 24 files, 230 tests passed - scripts typecheck passed - exact-commit 11-stage full local CI passed for `973bebf72b97200d81c3899eb14c8fafabee6837` - normal pre-push quick gate passed Implemented with GPT-5.6-Sol through the Codex harness in T3 Code.
The checkpoint smoke stage could resolve the caller worktree’s `vp` binary through pnpm’s inherited PATH, mixing module graphs inside the isolated sync worktree. After installing the recovery worktree, run its smoke tests and scripts typecheck through that worktree’s explicit local `node_modules/.bin/vp`. Tests cover the runner path selection. The focused scripts suite, scripts typecheck, exact-commit 11-stage local CI, and independent pre-push gate pass. Implemented by GPT-5.6-SOL through the Codex harness.
The launchd automation worktree was created without dependencies, so its first checkpoint invocation could not import workspace packages. A current main also attempted an unchanged promotion, unnecessarily triggering the full pre-push gate every hour. The installer now provisions the durable automation worktree before loading the agent, and each scheduled run reconciles dependencies after checking out `lastcode/main`. Promotion exits before the PR check or push when the remote branch already matches the newest checkpoint. The behavior and upgrade path are documented under `docs/lastcode/`. Focused tests, scripts typecheck, actual upgrade-in-place provisioning, exact-commit 11-stage local CI, and the independent pre-push gate pass. One cold automation-worktree run reached CI successfully but hit an upstream diff-highlighter test transient (650/651); that test passed in both subsequent exact-commit and pre-push runs. Implemented by GPT-5.6-SOL through the Codex harness.
The scheduled checkpoint job successfully rebased LastCode onto a new upstream nightly, then failed before smoke validation because launchd could not resolve the bare `vp` executable used to install the new sync worktree. Use the invoking automation worktree’s explicit `node_modules/.bin/vp` to bootstrap dependencies in the isolated sync worktree. After installation, continue using that sync worktree’s own Vite+ runner for smoke tests and typechecking. Document the two-stage runner model under `docs/lastcode/`. Validation includes focused checkpoint/service tests, scripts typechecking, a real install under launchd’s restricted PATH against the retained `1076` recovery worktree, all 57 recovery smoke tests, exact-commit 11-stage local CI, and the independent pre-push gate. Implemented by GPT-5.6-SOL through the Codex harness.
The nightly checkpoint service has durable tags and raw launchd logs, but no concise way to see recent checkpoint health, replay size, timing, promotion, or build state. This adds an installable `lastcode-checkpoints` command using the shell mocolors palette, records structured timing and failure history, enriches new annotated checkpoint tags, and documents installation and operation. The executable lives in `~/.lastcode/bin` and is exposed through `~/.local/bin`; it parses launchd status without dumping inherited environment values. Validation: - focused checkpoint/dashboard tests - scripts workspace typecheck - scoped lint and formatting - full pre-push quick gate (format/lint, workspace typechecks, and all workspace tests) - installed command exercised from outside the repository Generated with GPT-5.6 Codex in the T3 Code harness.
## Problem Git hooks export repository-local environment variables such as `GIT_DIR`. When those variables leak into nested temporary-repository tests, a command such as `git init --bare` can reconfigure the real shared repository instead of its fixture. That can damage both the primary checkout and every linked worktree. ## Changes - clear all variables reported by `git rev-parse --local-env-vars` at the pre-push hook boundary - require the shared repository config to report `core.bare=false` before local CI - snapshot the shared config byte-for-byte and verify the value, contents, and common Git directory again on every CI exit, including failures - cover hook cleanup, bare-repository rejection, and config-mutation detection with focused tests - document the three Git-safety layers and the fail-closed recovery policy under `docs/lastcode/` The guard reports the affected config path and stops. It deliberately does not auto-repair repository state, so evidence is preserved for inspection. ## Validation - pre-push quick CI: passed - focused LastCode CI/nightly tests: 16 passed - scripts workspace typecheck: passed - scoped lint: passed - hook test verified from both repository-root and scripts-package working directories Built by GPT-5.6 Codex in T3 Code.
Checkpoint tags already pass the dedicated checkpoint smoke gate before publication, but each tag push also triggered the generic pre-push quick gate. Catching up across multiple nightlies therefore reran the full workspace suite once per immutable tag, and unrelated nondeterministic tests repeatedly blocked publication after the checkpoint itself had passed. This change pushes a checkpoint tag with `--no-verify` only when that checkpoint actually ran and passed the dedicated smoke gate. Bootstrap checkpoints and explicit `--no-smoke` runs retain the generic pre-push hook. Ordinary branch pushes and `lastcode/main` promotion are unchanged and still run quick local CI. The patched runner successfully published checkpoints 1079, 1081, and 1082 after 65 focused smoke tests each, then ran the full quick gate once while promoting 1082 to `lastcode/main`. Validation: - `vp test run scripts/lastcode-checkpoint.test.ts` — 12 tests passed - scripts workspace typecheck passed - branch pre-push quick CI passed, including 2,490 server tests, 2,378 web tests, and 657 mobile tests Implemented with Codex in T3 Code using GPT-5.6.
The nightly runner successfully published checkpoint tags, but if the initial `lastcode/main` promotion failed, later runs could not identify the already-published checkpoint as the correct retry target. They therefore reported no missing nightlies while leaving main on an older checkpoint. This records the exact source commit in new checkpoint tag metadata and resumes from the newest checkpoint when that metadata matches the unchanged main source. Existing promoted-checkpoint behavior remains intact, and new commits on main still start a fresh rebase sequence. Validation: - 23 focused checkpoint/nightly tests passed - scripts workspace typecheck passed - pre-push quick CI passed, including all workspace tests Implemented with Codex in T3 Code using GPT-5.6.
LastCode needs an explicit contribution model for two kinds of work: private fork integrations and improvements that should be offered upstream while remaining available downstream. This documents the independent branch and PR bases for both streams, refreshes the fork contribution workflow, and adds repository skills for executing each workflow consistently. Validation: - both skills pass `skill-creator`'s `quick_validate.py` - all six changed files pass the repository formatter - `pnpm lastcode:ci:quick` Documented with Codex in T3 Code using GPT-5.6.
LastCode checkpoints are currently buildable only from the command line, so the desktop update control cannot carry an installed personal build forward. This adds an opt-in LastCode settings page and a local checkpoint update source. New checkpoint tags appear in the existing sidebar control with commit summaries; the first click runs full local CI and creates an ad-hoc-signed DMG plus updater ZIP in an isolated worktree, and the second click uses the existing Electron staging and restart path. The feature is disabled by default and never shares or cleans a human checkout or the checkpoint daemon worktree. Validation: `pnpm lastcode:ci` passed for `791ce60245b7aae0415b1c3cf7281a5b0d21813b`; the pre-push `pnpm lastcode:ci:quick` gate also passed. Implemented with Codex in T3 Code using GPT-5.6.
A fresh LastCode profile requires repeating a large amount of harmless UI and workflow setup from T3 Code. Copying the entire profile is unsafe because the two applications must retain independent identities, databases, connections, secrets, network settings, and update state. This adds a Settings → LastCode import preview and an explicit Import and restart action. It validates the three supported JSON documents, copies client preferences and keybindings, allowlists safe server/provider fields, preserves LastCode-only and secret-bearing values, backs up existing files with private permissions, and atomically replaces them with rollback on failure. The new LastCode runbook documents the imported categories and exclusions. Validation: - read-only preview against the local T3 Code and LastCode profiles: all three categories ready - focused importer tests: 4 passed - focused contracts, desktop, and web typechecks - focused lint - full local CI for bc9f0b0 (all 11 stages) - pre-push quick local CI Generated with Codex (GPT-5.6 Sol) through the T3 Code Codex harness.
The LastCode project entry still selected the upstream T3 development icon, so the project list displayed a blue T3 badge. Point `t3.json` at the existing LastCode development touch icon so project-icon resolution uses the fork branding. Implemented by GPT-5.6-sol through the Codex harness.
Local LastCode nightlies were difficult to build, install, recover, and trust as a continuous workflow: checkpoint conflicts could stall silently, local builds inherited unsafe ambient state, ad-hoc signing behavior drifted, and a delayed desktop keychain response could strand startup on an HTTP 500 screen. This makes the local-nightly lifecycle coherent end to end. It adds the userland lastcode-build and lastcode-install commands, records and resumes checkpoint conflict resolutions, makes the checkpoint dashboard actionable, keeps builds explicitly ad-hoc signed, retains local artifacts for installation, and retries desktop authentication for up to one hour after delayed keychain access. Documentation and focused coverage accompany each boundary. Validation: pre-push quick local CI passed on the exact head, including workspace formatting, lint, typechecks, and tests. Full local CI will run as the guarded merge gate. Built with GPT-5.6 in the Codex harness.
Merged LastCode work currently cannot become an in-app update until another upstream nightly arrives. Publish ordered `lastcode/revision/...` tags when `lastcode/main` advances between upstream checkpoints, teach the local updater and build tools to discover and package those revisions, and request an immediate daemon run after guarded merges. The hourly daemon remains the fallback, and the normal upstream checkpoint sequence still takes precedence. Documentation covers tag ordering, recovery, settings, and local builds. Validation: focused LastCode/desktop tests (186 passing), scripts typecheck, targeted lint, checkpoint dry-run, and the full quick local-CI push gate. Authored with GPT-5.6 SOL via the Codex harness.
The checkpoint daemon opened its SSH push connection before a long local pre-push gate. GitHub closed the idle connection after CI passed, and the hook validated the automation checkout rather than the revision commit being promoted. Use the existing candidate smoke validation before automation-controlled tag and branch updates, then push promotions and exact upstream mirrors with `--no-verify` and their existing exact force-with-lease guards. This keeps ordinary human branch pushes on the full pre-push gate while making daemon ref updates validate the correct commit without an idle transport. Validated with the complete local quick gate, 25 focused checkpoint tests, targeted lint, scripts typecheck, formatting, and diff checks. Model: GPT-5.6-sol (high reasoning) Harness: Codex in T3 Code
The cross-architecture Windows payload test treats any child command carrying ELECTRON_RUN_AS_NODE=1 as the packaged primary probe. LastCode local updates run from Electron and inherit that variable, so the ordinary Node self-containment check is misclassified and full local CI fails before a build can be produced. Identify the primary probe by both its packaged executable path and Electron runtime flag. This keeps the assertion scoped to its intended behavior and allows local update builds launched from LastCode. Upstream: pingdotgg#7253 Validation: - focused scripts/build-desktop-artifact.test.ts: 47 passed - exact-head full local CI passed for dfdb1d4 against eab34f9 - pre-push quick local CI passed Implemented with GPT-5.6-Sol through the Codex harness in T3 Code.
Successive ad-hoc-signed LastCode nightlies have different designated requirements, so Squirrel can build and download them but cannot reliably replace the running app. The failed handoff could leave LastCode alive without a visible window. Route only the LastCode-local source through the retained DMG and the existing managed installer primitive. The detached helper verifies the manifest SHA-256 and bundle version, acquires the shared install lock, stages the replacement, and reports readiness before backend shutdown. An explicit COMMIT/CANCEL handoff owns quit, rollback-safe swap, and relaunch; hosted signed updates continue using electron-updater. Validation: focused updater/installer tests, targeted lint, desktop and workspace typechecks, two complete Quick CI passes on the exact head, and a real retained-DMG preflight/cancel with no residual mount, staging path, backup, or lock. Fixes #20 Implemented by GPT-5.6-sol through the Codex harness in T3 Code.
Issue #21 needs a configurable shortcut for switching between the inbox and legacy sidebars without changing the existing default keymap. This adds the unbound `sidebar.mode.toggle` command, exposes it in Keybindings settings, and routes it through the existing persisted legacy-sidebar preference. Client-settings functional updates now persist in invocation order so rapid toggles cannot write stale desktop state out of order. Focused contract, server, resolver, settings-label, and persistence tests cover the behavior, and the user keybinding documentation describes the command. Closes #21 Implemented and validated with GPT-5.6-sol through the Codex harness in T3 Code.
Drafts remain in the composer store after navigation, but the legacy sidebar did not render them. That left users with no way to return to an unsent draft while the legacy sidebar was enabled. This ports [pingdotgg#7120](pingdotgg#7120) at pinned head `799ba957f51cd0b48ad8e5020090814318d0388f`. It exports the existing `SidebarDraftBlock` and reuses it above the legacy project list through a small wrapper that supplies project lookup, route state, and navigation. Upstream authorship and the `cherry-pick -x` provenance trailer are preserved. ## Validation - LastCode Quick CI passed on Node 24.13.1 at the current head. - Focused web typecheck and lint passed. - 3 nearby test files passed: 118 tests. - Manual isolated-app verification passed for draft appearance, restoration, discard, zero-draft layout, and default-sidebar parity. - Responsive verification passed at 465 × 800: selecting the persisted draft restored its exact text and closed the sidebar. - Matched desktop and responsive before/after evidence is attached in the PR conversation. Model and harness: GPT-5.6-Sol via the Codex harness in LastCode/T3 Code. Co-authored-by: VIvidh Mahajan <vividhmahajan@gmail.com>
Local nightly builds can run for several minutes without a percentage, leaving the existing circular download indicator looking inert. The checkpoint dashboard also only matched build tags to the bare upstream checkpoint, so built LastCode revisions such as `1110.1` appeared to have no build. This makes the integrated download ring spin indeterminately while progress is unknown (with reduced-motion support), while retaining determinate progress for hosted downloads. It also renders actually built LastCode revisions as indented pacific-colored rows under their parent checkpoint, with commit, main, and build-number evidence. Validation: - focused tests: 18 passed - targeted lint: passed - web and scripts typecheck: passed - LastCode quick CI: passed Generated with Codex (gpt-5.6-sol) in T3 Code.
The direct LastCode installer could hang before its 30-second shutdown deadline began because it waited synchronously for the app's quit AppleEvent response. Send the quit request without waiting for an application response, then enforce the existing bounded running-state poll. Add focused coverage for both a clean quit and an application that never exits. Validation: focused installer tests, targeted lint/format/typecheck, and LastCode Quick CI. Generated with Codex (gpt-5.6-sol) in T3 Code.
The first complete upstream-import tracer exposed workflow requirements that do not belong in `upstream-fix`, which handles the opposite direction. Without a dedicated lane, future imports risk following moving PR heads, confusing path overlap with conflicts, or treating upstream CI as downstream acceptance. This adds an `import-upstream-pr` skill for evaluating open-unmerged and closed-unmerged T3 Code pull requests, preserving pinned provenance, validating on the current LastCode base, publishing evidence, and handing delivery to the existing guarded LastCode workflow. A focused reference captures intake receipts, duplicate detection, UI evidence, and squash patch-equivalence checks. ## Validation - Skill Creator `quick_validate.py` passed. - `git diff --check` passed. - Fresh-context read-only forward test against pingdotgg#7120 correctly detected the already-merged identical patch and stopped before creating another port. - LastCode Quick CI passed on Node 24.13.1. Model and harness: GPT-5.6-Sol via the Codex harness in LastCode/T3 Code.
Part of #13 Project Actions could run in terminals, but an agent could not explicitly launch one and receive a trustworthy follow-up when it finished. Long-running Actions therefore required polling or manual user intervention. This adds a bounded LastCode-only resume seam: - locally opted-in Actions are exposed to Codex through scoped MCP tools - each invocation runs in a dedicated thread terminal and persists one-shot lifecycle state - success, failure, and user cancellation deliver one system-authored follow-up when the originating thread is eligible - interrupted processes require explicit review and resume after restart - web and desktop show a yellow Waiting state with terminal and cancellation controls - desktop quit flows warn with the number of running Actions Mobile UI is intentionally deferred to the next slice. Validation: - `pnpm lastcode:ci:quick` passed locally on Node 24.13.1 - integrated web QA covered prompt-driven discovery/launch, successful completion, cancellation, exactly-one follow-up, and ordinary non-resuming Action behavior - the ELI5 architecture document passes its structural verifier and desktop/narrow visual checks Implemented by GPT-5.6-Sol through the Codex harness in T3 Code.
Part of #13. The Action-resume lifecycle shipped in the first slice was visible and controllable only from web/desktop. A user checking the originating thread from iPhone could not see that LastCode was waiting, cancel the running Action, or resolve an interrupted follow-up. This reuses the existing `actionResume` shell state and existing close/resume/discard commands on mobile: - running Actions show a yellow **Waiting** status and stay out of the settled tail - the thread view shows a compact waiting/recovery card - users can cancel a running Action or choose **Resume agent** / **Discard** after restart - legacy and v2 mobile thread lists receive the same status and cancellation affordance This is intentionally a thin, temporary client slice for a single-user macOS workflow pending the V2 orchestrator. It adds no scheduler, server persistence model, compatibility layer, timeout, or Android-specific behavior. ### iOS QA Verified on an iPhone 17 Pro simulator against a disposable local LastCode environment. The recovery card rendered with both choices, and tapping **Discard** reached the server and persisted the disposed lifecycle state.  ### Validation - `pnpm lastcode:ci:quick` - focused tests: 224 passed - mobile suite: 732 passed - native iOS dev-client build: succeeded - targeted contracts, client-runtime, and mobile typechecks: passed Built with GPT-5.6 Codex in T3 Code.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 91e5265c38
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9792eb0729
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 13f76f2a96
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 346c4aca92
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c88062c541
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ba35113681
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1bb1592c42
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ecb2d0421f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b0b6a8b5a5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 117da82d10
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
50850d4 to
a71f73a
Compare
Problem
Codex can already discover and inspect LastCode/T3 Code sessions by probing environment variables and SQLite, but that path is unofficial, inconsistent, and awkward across hosts. A single user running a handful of concurrent threads needs a small supported command surface for identifying, listing, reading, messaging, and waiting on those threads.
Implemented
This umbrella contains all three reviewed slices:
current,list, andreadcommands plus the generatedlastcode-threadlauncher. Reads prefer the authenticated live server and use a bounded, read-only SQLite fallback.send.send --waitcorrelation and standalonewait, with bounded answers and recovery handles.Codex receives authoritative LastCode and provider thread identity. Cross-host use deliberately composes the same command over SSH. Durable usage documentation is in
docs/user/codex-thread-tools.md.Scope
This remains a personal, low-concurrency tool. It does not add an MCP server, broker, host registry, UI, generic retry framework, or general-purpose orchestrator. If the provider accepts a turn but the process dies, correlation finalization fails, the assistant-finalization marker cannot be persisted before the durable link is recorded, or a checkpoint revert removes the tracked turn, that wait handle can time out; automatic retry and reconciliation are intentionally deferred.
Validation
117da82d1passed the full 11-stage local CI gate on base01822dce4, including all workspace tests and typechecks, 2,719 passing server tests, desktop build, native checks, and release smoke.Do not merge this umbrella PR into
lastcode/mainuntil the user explicitly rubberstamps it.Implemented by GPT-5.6 Sol, reviewed with GPT-5.6 Luna, in the T3 Code Codex harness.