What happened
A TUI side conversation is a Session copy that carries the parent's transcript. The driver hides it by recording #hiddenTranscriptThroughTurnId and filtering every transcript it hands the runner through visibleTranscriptMessages(). One path skips that filter.
packages/cli/src/runtime-host-session-driver.ts:1155 builds the attached Turn for a Host-started Turn with the raw opened.messages:
const turn = {
sessionId,
turnId,
events: opened.channel.eventsForTurn(turnId),
messages: opened.messages, // unfiltered
summary: projectSessionCatalogSummary(configuration.session),
} satisfies MakaAttachedSessionTurn;
Every sibling applies the filter — switchSession at line 563, the transcript-replacement subscriptions at lines 251 and 1243 — so this is the one gap rather than a deliberate exception.
packages/cli/src/pi-tui-runner.ts then replaces the visible transcript with exactly those messages when it adopts the attached Turn, so the parent conversation the user opened /side to get away from reappears in full.
Expected: /side shows only what happened inside the side conversation, on this path as on the others.
How to reproduce
- Start the TUI on a Session that already has several Turns.
- Run
/side to open a side conversation.
- Confirm the transcript is empty, as intended.
- Cause a Host-started Turn to arrive on the side Session — the reattach path at
runtime-host-session-driver.ts:1155, e.g. reconnecting while a Turn is running there.
- The transcript is replaced with the copied parent transcript.
Deterministic once step 4 is reached; the difficulty is arranging a Host-started Turn rather than a client-started one.
Environment
Logs, screenshots, or additional context
Found while reviewing #3803; not attributable to that PR — git log -S puts both the unfiltered messages: opened.messages and the runner's transcript replacement before its base commit.
The fix is to route this path through the same filter the siblings use:
messages: visibleTranscriptMessages(opened.messages, this.#hiddenTranscriptThroughTurnId),
Worth landing after #3760, which is open against the same two files.
What happened
A TUI side conversation is a Session copy that carries the parent's transcript. The driver hides it by recording
#hiddenTranscriptThroughTurnIdand filtering every transcript it hands the runner throughvisibleTranscriptMessages(). One path skips that filter.packages/cli/src/runtime-host-session-driver.ts:1155builds the attached Turn for a Host-started Turn with the rawopened.messages:Every sibling applies the filter —
switchSessionat line 563, the transcript-replacement subscriptions at lines 251 and 1243 — so this is the one gap rather than a deliberate exception.packages/cli/src/pi-tui-runner.tsthen replaces the visible transcript with exactly those messages when it adopts the attached Turn, so the parent conversation the user opened/sideto get away from reappears in full.Expected:
/sideshows only what happened inside the side conversation, on this path as on the others.How to reproduce
/sideto open a side conversation.runtime-host-session-driver.ts:1155, e.g. reconnecting while a Turn is running there.Deterministic once step 4 is reached; the difficulty is arranging a Host-started Turn rather than a client-started one.
Environment
origin/main(present since feat(tui): add side conversation lifecycle #3759, which introduced both sides of this path)Logs, screenshots, or additional context
Found while reviewing #3803; not attributable to that PR —
git log -Sputs both the unfilteredmessages: opened.messagesand the runner's transcript replacement before its base commit.The fix is to route this path through the same filter the siblings use:
Worth landing after #3760, which is open against the same two files.