fix(background-agent): preserve non-sensitive timing in archived tasks

Carry queuedAt and startedAt in sanitized archive snapshots so post-cleanup task output duration remains accurate without retaining prompt content.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-05-11 08:53:44 +09:00
parent a4ce0b63b6
commit eb6605a87f
2 changed files with 3 additions and 0 deletions
@@ -6017,6 +6017,7 @@ describe("BackgroundManager regression fixes - resume and aborted notification",
const archivedTask = manager.getTask(task.id)
expect(archivedTask?.sessionId).toBe(task.sessionId)
expect(archivedTask?.prompt).toBe("[redacted]")
expect(archivedTask?.startedAt).toEqual(task.startedAt)
manager.shutdown()
})
+2
View File
@@ -383,6 +383,8 @@ export class BackgroundManager {
agent: task.agent,
sessionId: task.sessionId,
status: task.status,
queuedAt: task.queuedAt,
startedAt: task.startedAt,
completedAt: task.completedAt,
model: task.model,
error: task.error,