Repository navigation
fix(server): dev servers a Codex agent starts show under its thread - #29687
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Codex-started development servers now participate in existing thread-associated port discovery. The change reuses established discovery safeguards and scoped cleanup, with no material change to product defaults. Notes:
You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Scoped agent tracking apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts, apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.test.ts |
The factory requires PortDiscovery and acquires agent tracking in the client scope. The test checks the tracked-agent count after opening the client and after the scope closes. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related PRs
- pingdotgg/t3code#22542: This PR introduces
PortDiscovery.trackAgent(), which this change uses for the Codex app-server scope.
Suggested reviewers: juliusmarminge, maria-rcks
Merge Risk: 
Minimal · up to b5a9a
-
Codex server discovery is enabled for tracked sessions. No merge-blocking issue was established.
Pre-merge checks: 
4
Finishing Touches
-
Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Usage-based review receipt
- Mode: Continue automatically
- Reviewed files: 1
- Charged: $0.25
- View usage details
Note
This review was completed with usage-based billing: files reviewed beyond your plan's included limits are billed at $0.25/file. View usage-based billing.
CodeRabbit Verify
- Run CodeRabbit Verify to test the changes in this pull request.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dismissing prior approval to re-evaluate b5a9aae
|
Note Written by Verified in a real dev environmentverified unchanged head
before, main with a responding codex-started listener: after, same project, thread, server and port on the pr head: opening the discovered server and stopping it through the ui: Not verifiednative ios/android clients, electron desktop, macos/windows process discovery, remote/relay/tunnel connections, other providers, and concurrent codex threads were not exercised on this linux web-client pass. video playback and seeking were checked in chrome; t3's rendered comment player was not available on this vm. no source changes were needed. |
**v0.1.7-nightly.20261104.4151** · 155 changes from 31 contributors - **Share thread links.** Copy a thread link to share anywhere and open the thread directly. - **Secret-backed usage limits.** Use a secret provider such as 1Password for usage-limit source keys. - **Windows Group Policy.** Windows administrators can configure T3 Code using a Group Policy template. - **Faster pairing.** New pairing links display their QR code immediately in Settings. - **Saved drafts.** Drafts saved by older versions now survive updates. - **Codex threads.** Codex threads open in another client are no longer silently replaced. - **Background work.** Queued provider or model switches no longer end running background agents and commands. ### Plus 137 more bug fixes and performance improvements. <details> <summary>Full changelog</summary> ## What's Changed * fix(github): Rebase stack no longer conflicts after a lower layer is squash-merged by @saphid in pingdotgg/t3code#29919 * fix(server): changing a task's wake policy no longer reverts a checkpointed parent run by @juliusmarminge in pingdotgg/t3code#25662 * perf(server): settled PR lookups stop re-spawning git every sweep by @juliusmarminge in pingdotgg/t3code#29721 * fix(server): generated commit and PR text ignores git signature output by @saphid in pingdotgg/t3code#29580 * fix(web): picking a branch in a subfolder project keeps the thread in the project folder by @saphid in pingdotgg/t3code#29908 * fix(mobile): close and reopen pull requests from the actions menu by @juliusmarminge in pingdotgg/t3code#29962 * fix(web): mouse wheel over the thread minimap glides instead of jumping by @flamboh in pingdotgg/t3code#29038 * fix(server): managed policy covers Kiro by @juliusmarminge in pingdotgg/t3code#29915 * fix(server): t3 update installs from the policy's update mirror by @juliusmarminge in pingdotgg/t3code#29911 * fix(desktop): Ctrl+R on macOS reaches the preview page instead of reloading it by @saphid in pingdotgg/t3code#29893 * fix(server): native forks after an undo no longer copy later turns by @saphid in pingdotgg/t3code#29902 * fix(server): idle compaction still runs after a queued message is removed or steered by @saphid in pingdotgg/t3code#29904 * fix(server): guests of a forked thread can open files on the messages it inherited by @saphid in pingdotgg/t3code#29794 * fix(evals): resume browser verification after unavailable status by @Yash-Singh1 in pingdotgg/t3code#30298 * fix(shared): saving one source control token no longer drops the other hosts' tokens by @yordis in pingdotgg/t3code#29554 * fix(desktop): a policy that stops startup no longer points at another release by @juliusmarminge in pingdotgg/t3code#30319 * docs: pin an absolute binary path under a permission cap by @juliusmarminge in pingdotgg/t3code#29916 * fix(mobile): Android follow-up menu shows in full with the keyboard open by @juliusmarminge in pingdotgg/t3code#29263 * fix(web): deleting the open thread no longer opens a snoozed or settled thread by @juliusmarminge in pingdotgg/t3code#29643 * fix(web): closing Settings or Usage no longer jumps back to a quote's source by @juliusmarminge in pingdotgg/t3code#29013 * fix(server): squash-merged branches no longer offer push & create PR by @juliusmarminge in pingdotgg/t3code#28494 * fix(mobile): settings providers show the ACP registry icon by @juliusmarminge in pingdotgg/t3code#28135 * fix(server): Grok usage limits tell Legacy-mode xAI accounts to switch to Privacy Mode by @juliusmarminge in pingdotgg/t3code#28097 * fix(usage): label a proxied Claude account by its e-mail, and drop .json from hub rows by @juliusmarminge in pingdotgg/t3code#28065 * fix(gitlab): a signed-out default glab host no longer hides other signed-in hosts by @juliusmarminge in pingdotgg/t3code#27840 * perf(server): prune events the projections already cover by @juliusmarminge in pingdotgg/t3code#29806 * fix(server): GPT-6.1 Sol no longer compacts after every tool call on managed Codex by @maria-rcks in pingdotgg/t3code#30004 * feat(policy): admins set managed policy from a Group Policy template by @juliusmarminge in pingdotgg/t3code#29862 * perf(server): bound streaming recovery reads by active runs by @Yash-Singh1 in pingdotgg/t3code#30357 * perf(server): read pull request metadata from a lightweight snapshot by @Yash-Singh1 in pingdotgg/t3code#30356 * fix(server): cancelling worktree setup no longer leaves its new branch behind by @saphid in pingdotgg/t3code#29781 * feat(mobile): add on-device Android dictation by @PixPMusic in pingdotgg/t3code#26734 * feat(server): read usage limit source keys from a secret provider by @yordis in pingdotgg/t3code#27760 * feat(device): read the EAS access token from a secret provider by @yordis in pingdotgg/t3code#27763 * fix(server): route missing read-only queries to readers by @Yash-Singh1 in pingdotgg/t3code#30366 * perf(server): index delegated recovery candidates by @Yash-Singh1 in pingdotgg/t3code#30359 * feat(server,web,mobile,desktop): Copy thread copies a link that opens the thread by @juliusmarminge in pingdotgg/t3code#26290 * feat(mobile,web): copied thread links open the mobile app by @juliusmarminge in pingdotgg/t3code#29815 * fix(antigravity): rate-limited turns keep their reset time by @saphid in pingdotgg/t3code#29594 * fix(server): startup no longer hangs on a shell stuck in the kernel by @AdEx-Partners-DE in pingdotgg/t3code#27938 * fix(server): reverting files before the first commit no longer leaves them staged by @Abhishek-B-R in pingdotgg/t3code#28647 * fix(server): truncated Claude task output no longer starts with a replacement character by @Abhishek-B-R in pingdotgg/t3code#28643 * fix(shared): relative file links with routing punctuation open as files by @Abhishek-B-R in pingdotgg/t3code#28637 * fix(server): messages cut by a restart no longer stay marked as streaming by @Abhishek-B-R in pingdotgg/t3code#28646 * fix(server): Antigravity Auto asks instead of approving every request by @parmartejass in pingdotgg/t3code#23698 * fix(server): Codex threads open in another client are no longer silently replaced by @derektrimm in pingdotgg/t3code#21045 * fix(server): WSL servers avoid ports already used by Windows by @tylerjenningsw in pingdotgg/t3code#22962 * perf(web): reuse repeated inline skill lookups by @luke2x in pingdotgg/t3code#29008 * fix(opencode): expand home-relative executable paths by @voltcrash in pingdotgg/t3code#29326 * fix(server): title regeneration works after a thread's worktree is cleaned up by @saphid in pingdotgg/t3code#29606 * fix(server): dev servers a Codex agent starts show under its thread by @saphid in pingdotgg/t3code#29687 * fix(server): status no longer fetches a remote named after a local tracked branch by @saphid in pingdotgg/t3code#29670 * fix(server): preview snapshots no longer cut an emoji in half by @saphid in pingdotgg/t3code#29600 * fix(server): restart notes no longer split an emoji in a long background task label by @saphid in pingdotgg/t3code#29647 * fix(acp): Always allow no longer cancels the turn when an agent only offers allow-once by @MarcoDotIO in pingdotgg/t3code#29463 * fix(server): forking a Codex thread archived outside T3 Code no longer fails by @saphid in pingdotgg/t3code#29618 * perf(shared): stop single-token message search at the best hit by @hieu-lee in pingdotgg/t3code#28930 * fix(preview): a dropped stream withdraws its stale file picker by @saphid in pingdotgg/t3code#29655 * fix(provider-acp): ACP threads keep receiving events after a rollback by @trevoedwards in pingdotgg/t3code#28987 * perf(opencode): provider event logs skip per-token reply deltas by @saphid in pingdotgg/t3code#29673 * fix(web): open files from Claude and ACP tool-call diffs by @Jo2234 in pingdotgg/t3code#29309 * fix(server): files tree labels ignored folders inside git submodules by @saphid in pingdotgg/t3code#29650 * fix(server): server updates reclaim partial database backups left by killed updates by @MarcoDotIO in pingdotgg/t3code#29464 * fix(server): PR watch wakes no longer split an emoji in a long comment by @saphid in pingdotgg/t3code#29633 * fix(server): pinning a settled thread stamps its return to the active list by @saphid in pingdotgg/t3code#29602 * fix(server): Claude's commands no longer run Electron apps as Node by @u9g in pingdotgg/t3code#29413 * docs: keybindings guide lists the rightPanelOpen when key by @saphid in pingdotgg/t3code#29677 * perf(shared): avoid redundant visibility work on status updates by @hieu-lee in pingdotgg/t3code#28965 * fix(desktop): failed settings saves no longer leave temp files behind by @saphid in pingdotgg/t3code#29635 * fix(acp): a final agent message without a trailing newline is no longer dropped by @saphid in pingdotgg/t3code#29605 * fix(server): terminal history keeps output after an unterminated OSC by @saphid in pingdotgg/t3code#29604 * fix(cli): t3 up's pairing hint keeps --base-dir by @saphid in pingdotgg/t3code#29684 * fix(shared): preserve omitted components in zero-major caret ranges by @Jo2234 in pingdotgg/t3code#29335 * fix(server): thread titles use linked PR context when the URL is followed by a colon or bold markers by @saphid in pingdotgg/t3code#29656 * fix(source-control): remotes like github.com:owner/repo reach their host by @MarcoDotIO in pingdotgg/t3code#29457 * fix(server): terminal history keeps text with C1 characters by @saphid in pingdotgg/t3code#29649 * fix(server): worktree handoff follows the project's start-from-origin setting by @saphid in pingdotgg/t3code#29810 * fix(server): review keeps tracked changes when untracked files overflow the listing by @saphid in pingdotgg/t3code#29615 * fix(server): browser setup advice names the server's T3 home by @saphid in pingdotgg/t3code#29646 * fix: honor generic MIME aliases in attachment previews by @Jo2234 in pingdotgg/t3code#29360 * fix(client-runtime): terminals fit their pane again after a reconnect by @saphid in pingdotgg/t3code#29696 * fix(server): Run now on a scheduled task says why it was refused by @saphid in pingdotgg/t3code#29620 * fix(server): a preview_open whose first load fails no longer leaves a hidden tab behind by @saphid in pingdotgg/t3code#29865 * fix(cursor): Cursor text generation names usage-limit failures by @saphid in pingdotgg/t3code#29748 * fix(server): review diffs keep working with untracked files outside the sparse cone by @saphid in pingdotgg/t3code#29880 * fix(opencode): nested custom commands like /git/commit run as commands by @saphid in pingdotgg/t3code#29765 * fix(source-control): renamed files in GitHub, GitLab and Azure DevOps diffs show as renames by @saphid in pingdotgg/t3code#29774 * fix(opencode): a command that exits non-zero is stored as failed, not completed by @saphid in pingdotgg/t3code#29824 * fix(server): linked environments pick up the other machine's new name by @saphid in pingdotgg/t3code#29779 * fix(server): document text skips tracked deletions and field codes by @saphid in pingdotgg/t3code#29796 * fix(server): OTLP export settings survive a saved token streaming mode by @saphid in pingdotgg/t3code#29786 * fix(server): Word text boxes are no longer extracted twice for agents by @saphid in pingdotgg/t3code#29827 * fix(server): new projects are created when core.safecrlf refuses LF files by @saphid in pingdotgg/t3code#29843 * fix(web): drafts saved by older versions load instead of being wiped by @saphid in pingdotgg/t3code#29828 * fix(server): Antigravity text generation shows sign-in and setup errors by @saphid in pingdotgg/t3code#29823 * fix(web): picking a custom model named like a Codex alias keeps that model by @saphid in pingdotgg/t3code#29789 * fix(server): turn checkpoints keep LF files when core.safecrlf is true by @saphid in pingdotgg/t3code#29826 * fix(shared): find in thread matches a word typed with a curly apostrophe by @saphid in pingdotgg/t3code#29759 * fix(server): review rows for nested repositories load in large diffs by @saphid in pingdotgg/t3code#29693 * fix(server): t3_worktree_list lists refs after storage cleanup removes a thread's worktree by @saphid in pingdotgg/t3code#29645 * fix(provider-core): text generation context cuts no longer split an emoji by @saphid in pingdotgg/t3code#29653 * fix(server): html_preview no longer splits an emoji in a long console line by @saphid in pingdotgg/t3code#29844 * fix(server): diffs keep submodule changes under diff.submodule=log by @saphid in pingdotgg/t3code#29852 * fix(opencode): OpenCode 2 titles for image messages skip images the server cannot open by @saphid in pingdotgg/t3code#29819 * fix(server): orchestrator_capabilities no longer offers providers the project turned off by @saphid in pingdotgg/t3code#29842 * fix(web): big terminal selections no longer break sending by @saphid in pingdotgg/t3code#29804 * test(web): file editor dismissal test waits for the editor to render by @juliusmarminge in pingdotgg/t3code#30350 * test(web): worked-for heading test clicks once the list is revealed by @juliusmarminge in pingdotgg/t3code#30404 * fix(azure-devops): legacy DefaultCollection pull request URLs can be pasted to check out by @saphid in pingdotgg/t3code#29763 * fix(shared): preview_open reports about: and mailto: as unsupported instead of misreading them by @saphid in pingdotgg/t3code#29614 * fix(server): delegated threads no longer share one provider event log by @onlydole in pingdotgg/t3code#29770 * fix(server): a queued provider switch no longer ends background work by @juliusmarminge in pingdotgg/t3code#30401 * fix(kiro): slow kiro-cli starts no longer show Kiro as unavailable by @saphid in pingdotgg/t3code#29841 * fix(client): mark unread sticks on a thread reopened within ten minutes by @saphid in pingdotgg/t3code#29814 * fix(pi): extension errors name folder extensions instead of "index" by @saphid in pingdotgg/t3code#29768 * fix(github): Enterprise Server pull request URLs can be pasted to check out by @saphid in pingdotgg/t3code#29892 * fix(server): a peer refusing one call no longer marks its link as failing by @saphid in pingdotgg/t3code#29914 * perf(server): Claude skill discovery resolves each repository root once by @onlydole in pingdotgg/t3code#29757 * fix(server): t3 service uninstall leaves another T3 home's service alone by @saphid in pingdotgg/t3code#29872 * fix(server): PR watches wake again when a push leaves the branch conflicting by @saphid in pingdotgg/t3code#29767 * fix(muse): the thread error banner no longer shows unredacted failure text by @saphid in pingdotgg/t3code#29910 * fix(server): provider settings changed mid-refresh no longer revert to the old status by @saphid in pingdotgg/t3code#29894 * fix(shared): accept whitespace after engine range operators by @romil-bijarnia in pingdotgg/t3code#29730 * perf(server): stop tracing per-event live coalescer work by @onlydole in pingdotgg/t3code#29758 * test(desktop): the Windows shell kill test waits for each spawn before advancing the clock by @maria-rcks in pingdotgg/t3code#30463 * fix(shared): ignore unsupported command output control parameters by @romil-bijarnia in pingdotgg/t3code#29736 * fix(cli): t3 update no longer says a service awaiting restart runs the new version by @saphid in pingdotgg/t3code#29901 * fix(mcp): accept CR and mixed line endings in response streams by @romil-bijarnia in pingdotgg/t3code#29727 * fix(server): preview tabs that fail during setup no longer leave their page open by @saphid in pingdotgg/t3code#29885 * fix(provider-core): long subagent titles no longer end in a broken character by @saphid in pingdotgg/t3code#29906 * fix(shared): ignore unsupported command output erase modes by @romil-bijarnia in pingdotgg/t3code#29737 * fix(server): a failed scheduled run shows its error without a stack trace by @saphid in pingdotgg/t3code#29889 * perf(web): long threads stream with 70% less work-row derivation by @Entrpi in pingdotgg/t3code#29971 * fix(pi): send SIGTERM before closing Pi's stdin on teardown by @yaacovcorcos in pingdotgg/t3code#30025 * fix(server): clean up child worktrees after their parent settles by @voltcrash in pingdotgg/t3code#30026 * fix(server): Claude context meter shows the window for models outside the catalog by @hahhforest in pingdotgg/t3code#30051 * fix(server): quitting no longer waits on an unreachable telemetry endpoint by @levelorbit in pingdotgg/t3code#30033 * fix(client): keep snoozed failures hidden without completion times by @voltcrash in pingdotgg/t3code#30063 * perf(server): PR sync stops reading pull requests closed over a day ago by @advaitpaliwal in pingdotgg/t3code#30071 * fix(acp): file changes show the patch of every diff in a tool call by @Abhishek-B-R in pingdotgg/t3code#28631 * fix(server): Antigravity sign-in no longer blames the network while the runtime starts by @wenshen18643 in pingdotgg/t3code#30079 * fix(relay): read migrations in checkout paths with spaces by @domvox in pingdotgg/t3code#30080 * fix(cli): validate npm runtime before caching it by @voltcrash in pingdotgg/t3code#30099 * fix(server): SSH device host no longer reconnects on a single slow health probe by @gyurix in pingdotgg/t3code#30159 * fix(server): read continued core.bare values during onboarding by @imharjot in pingdotgg/t3code#30174 * fix(server): published repos fall back to HTTPS when SSH is refused by @saphid in pingdotgg/t3code#30142 * fix(opencode): fail stalled event subscriptions promptly by @voltcrash in pingdotgg/t3code#30201 * fix(server): a link card the user moved past no longer blocks auto-settle by @saphid in pingdotgg/t3code#29847 * fix(server): deleting a thread also removes its agent preview recordings by @saphid in pingdotgg/t3code#29853 * fix(server): review guides no longer fail on the repository's checkout hooks by @saphid in pingdotgg/t3code#29907 * fix(desktop): bump Electron to 44.10.1 for October Chromium security backports by @valuin in pingdotgg/t3code#30161 * chore(repos): sync reference repos from shallow clones by @juliusmarminge in pingdotgg/t3code#30472 * chore(repos): sync Effect 4.1.2 and Alchemy beta.85, rename effect-smol by @juliusmarminge in pingdotgg/t3code#30481 * Revert "fix(web): terminal controls no longer cover the first line" by @juliusmarminge in pingdotgg/t3code#30493 * feat(web): show a newly created pairing link without expanding the client list by @juliusmarminge in pingdotgg/t3code#30498 ## New Contributors * @Abhishek-B-R made their first contribution in pingdotgg/t3code#28647 * @tylerjenningsw made their first contribution in pingdotgg/t3code#22962 * @Jo2234 made their first contribution in pingdotgg/t3code#29309 * @u9g made their first contribution in pingdotgg/t3code#29413 * @onlydole made their first contribution in pingdotgg/t3code#29770 * @romil-bijarnia made their first contribution in pingdotgg/t3code#29730 * @Entrpi made their first contribution in pingdotgg/t3code#29971 * @hahhforest made their first contribution in pingdotgg/t3code#30051 * @levelorbit made their first contribution in pingdotgg/t3code#30033 * @advaitpaliwal made their first contribution in pingdotgg/t3code#30071 * @wenshen18643 made their first contribution in pingdotgg/t3code#30079 * @domvox made their first contribution in pingdotgg/t3code#30080 * @gyurix made their first contribution in pingdotgg/t3code#30159 * @imharjot made their first contribution in pingdotgg/t3code#30174 * @valuin made their first contribution in pingdotgg/t3code#30161 **Full Changelog**: pingdotgg/t3code@v0.1.7-nightly.20261103.4138...v0.1.7-nightly.20261104.4151 </details> Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.1.7-nightly.20261104.4151



Problem
When a Codex agent starts a dev server, it never shows up in the thread's discovered servers ("see and stop the dev servers a thread started", #22542). The same server started by a Claude agent does.
#28604 gave Codex shells
T3CODE_THREAD_ID, but port discovery only reads a listener's environment while it thinks an agent may be running. It learns that fromPortDiscovery.trackAgent(), and only the Claude query runner calls it. After the startup scan, a Codex-only setup has no tracked agents, no pending scan, and no marked listeners. Every later scan skips the environment read, so the scanner never sees the thread id #28604 added.PortScanner.test.tsalready spells this out: "With none marked, later scans stay idle."Change
CodexAdapterV2.layerAppServerClientFactory.opennow holdsportDiscovery.trackAgent()in the app-server's scope (Effect.acquireRelease). It counts as a running agent for as long as that process lives, the same way the Claude runner counts its CLI process until it exits. The merged provider infrastructure layer already requiredPortDiscoverythrough Claude'slayerQueryRunner, so no wiring changes.Scope and approval
Very small, focused fix for an obvious bug, so no prior issue: #28604 says it lets a Codex agent's shell "attribute a dev server to it", and this is the missing half that makes the scanner look. It is one acquire/release in one adapter plus one test. The other providers (ACP, Antigravity, Cursor, OpenCode, Grok) don't set
T3CODE_THREAD_IDat all. That is a separate parity question, left alone here.Overlap search: local index and GitHub search for
trackAgent,T3CODE_THREAD_ID, and Codex dev server/discovery. Closest: #28604 (merged, sets the env var only), #29669 (open, web sidebar setting, touches no server code), #27893 (merged, probe behaviour). None of them track Codex as an agent.Verification
CodexAdapterV2.test.ts("CodexAdapterV2 process exit"). It opens the real app-server client factory against a fakecodexscript with a mockedPortDiscovery, then checks the agent count is 1 while the session is open and 0 after its scope closes. Onmainit fails withAssertionError: expected +0 to equal 1.vp test run src/orchestration-v2/Adapters/CodexAdapterV2.test.ts: 134/134 pass (rerun after rebasing).ProviderInstanceRegistry.test.ts+ClaudeAgentSdkQueryRunner.test.ts: 32/32.vp run check:changed: format, lint, knip, graphql, typecheck (3 packages), tests all pass.Reviewed with sol-loop: 1 round with GPT-6.1 Sol on high. Sol verdict: approved.
Created with Claude Opus 5.5 in Claude Code (T3 Code).
🤖 Generated with Claude Code