Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): session import skips Codex subagent sessions #16662

MergedMnigos(GitHub profile, opens in a new tab)merged 4 commits intomain fromrefs/pull/16662/headmerged by juliusmarminge View on GitHub

Showing 2 changed files with 81 additions and 5 deletions.

x
0 of 2 viewed, 2 left
61 additions and 0 deletionsapps/server/src/project/AgentSessionScanner.test.tsModified
View file
@@ -1554,6 +1554,67 @@
+ it.effect("excludes Codex subagents from discovery and the recent-thread budget", () =>
+ Effect.gen(function* () {
+ const path = yield* Path.Path;
+ const nowMs = Date.parse("2026-08-24T12:00:00.000Z");
+ yield* TestClock.setTime(nowMs);
+ const claudeHomePath = yield* makeTempDir("t3code-claude-home-");
+ const codexHomePath = yield* makeTempDir("t3code-codex-home-");
+ const workspace = yield* makeTempDir("t3code-workspace-");
+ const subagentSources = [
+ { subagent: { thread_spawn: { parent_thread_id: "session-100", depth: 1 } } },
+ { subagent: "review" },
+ { subagent: { other: "guardian" } },
+ { subAgent: "compact" },
+ ];
+ // Newer subagents would exhaust the 100-transcript import budget before any parent.
+ const sources = [
+ ...Array.from({ length: 100 }, (_, index) => subagentSources[index % 4]),
+ "vscode",
+ undefined,
+ null,
+ { custom: "launcher" },
+ ];
+ for (const [index, source] of sources.entries()) {
+ yield* writeTranscript({
+ filePath: path.join(
+ codexHomePath,