From 5a107c7531d818fa92bf479f4e7a9f6fe0047822 Mon Sep 17 00:00:00 2001 From: Taras Date: Thu, 30 Jul 2026 13:22:58 +0300 Subject: [PATCH] fix(server): preserve root agent activity --- FORK.md | 1 + apps/server/src/provider/Layers/CodexSessionRuntime.ts | 9 +-------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/FORK.md b/FORK.md index fb57f415ca..f85c872600 100644 --- a/FORK.md +++ b/FORK.md @@ -72,6 +72,7 @@ This repository is a fork of `pingdotgg/t3code`. Keep this file focused on fork - Parent timelines keep subagent commands, file changes, tool calls, web searches, image views, and diffs. - Subagent messages, reasoning, goals, plans, token usage, and thread/turn state stay out of the parent timeline. Codex child relationships are recognized from both `collabAgentToolCall` and `subAgentActivity` items. +- Root-agent activity remains visible. Filtering applies only to provider thread IDs explicitly discovered through those child relationship items. ### Provider Launch Environment diff --git a/apps/server/src/provider/Layers/CodexSessionRuntime.ts b/apps/server/src/provider/Layers/CodexSessionRuntime.ts index a80ab40d93..7177958fd7 100644 --- a/apps/server/src/provider/Layers/CodexSessionRuntime.ts +++ b/apps/server/src/provider/Layers/CodexSessionRuntime.ts @@ -876,7 +876,6 @@ export const makeCodexSessionRuntime = ( const payload = notification.params; const route = readRouteFields(notification); const providerThreadId = readNotificationThreadId(notification); - const rootProviderThreadId = yield* currentSessionProviderThreadId; const childThreadTurns = yield* Ref.get(childThreadTurnsRef); const childParentTurnId = providerThreadId === undefined ? undefined : childThreadTurns.get(providerThreadId); @@ -884,13 +883,7 @@ export const makeCodexSessionRuntime = ( rememberChildThreadTurns(childThreadTurns, notification, parentTurnId); - const belongsToChild = - childParentTurnId !== undefined || - (providerThreadId !== undefined && - rootProviderThreadId !== undefined && - providerThreadId !== rootProviderThreadId); - - if (belongsToChild && !shouldKeepChildNotification(notification)) { + if (childParentTurnId !== undefined && !shouldKeepChildNotification(notification)) { yield* Ref.set(childThreadTurnsRef, childThreadTurns); return; }