Stop native chat jumping when Codex starts a foreground command (#26503)

* Keep foreground Codex commands out of the background strip

* Run the command-strip host regression in Node

* Exercise retained commands after their source turns end
This commit is contained in:
Brennan Benson
2026-10-08 13:02:03 -07:00
committed by GitHub
parent 5de53910aa
commit a062abffd2
18 changed files with 549 additions and 80 deletions
@@ -110,11 +110,14 @@ describe('persistent command retention', () => {
}).admission
).toEqual({ accepted: true })
}
expect(tracker.tasks()).toEqual([])
for (let thread = 0; thread < 7; thread += 1) {
const threadId = `thread-${thread}`
expect(tracker.threadCommands(threadId)).toHaveLength(64)
expect(
settleCodexJournalTurn({
sessionId: 'session',
threadId: `thread-${thread}`,
threadId,
turnId: 'turn',
turnLifecycle: null,
completedAt: 1,
@@ -125,6 +128,8 @@ describe('persistent command retention', () => {
attributionFor: () => ({ turnScope: AGENT_JOURNAL_THREAD_SCOPE })
})
).toEqual({ accepted: true })
expect(tracker.endTurn(threadId, 'turn')).toHaveLength(64)
expect(tracker.tasks()).toHaveLength((thread + 1) * 64)
}
expect(items.activeItems.size).toBe(448)
expect(items.streams.persistentCount).toBe(448)