diff --git a/packages/coding-agent/CHANGELOG.md b/packages/coding-agent/CHANGELOG.md index b38f337ee..7c7964669 100644 --- a/packages/coding-agent/CHANGELOG.md +++ b/packages/coding-agent/CHANGELOG.md @@ -2,6 +2,10 @@ ## [Unreleased] +### Changed + +- Retain completed and abandoned tasks in session history for improved context on resume + ### Fixed - Fixed compiled release binaries bundling `fastembed` and baking the build-machine `@anush008/tokenizers` path; native runtime dependencies now stay external for every compiled build path so Mnemopi resolves its on-demand install instead. ([#5195](https://github.com/can1357/oh-my-pi/issues/5195)) diff --git a/packages/coding-agent/src/modes/controllers/todo-command-controller.ts b/packages/coding-agent/src/modes/controllers/todo-command-controller.ts index 3f3855268..9df53fa87 100644 --- a/packages/coding-agent/src/modes/controllers/todo-command-controller.ts +++ b/packages/coding-agent/src/modes/controllers/todo-command-controller.ts @@ -133,8 +133,7 @@ export class TodoCommandController { /** * True latest todo state for the user-facing /todo verbs. Reads from session - * entries so that completed/abandoned tasks remain visible after resume - * (where `session.getTodoPhases()` would have stripped them). + * entries or falls back to the active session state. */ #currentPhases(): TodoPhase[] { const fromEntries = getLatestTodoPhasesFromEntries(this.ctx.sessionManager.getBranch()); diff --git a/packages/coding-agent/src/session/agent-session.ts b/packages/coding-agent/src/session/agent-session.ts index 479cc615b..694df6024 100644 --- a/packages/coding-agent/src/session/agent-session.ts +++ b/packages/coding-agent/src/session/agent-session.ts @@ -8724,12 +8724,7 @@ export class AgentSession { #syncTodoPhasesFromBranch(): void { const phases = getLatestTodoPhasesFromEntries(this.sessionManager.getBranch()); - // Strip completed/abandoned tasks — they were done in a previous run, - // so they have no bearing on progress tracking for the new turn. - for (const phase of phases) { - phase.tasks = phase.tasks.filter(t => t.status !== "completed" && t.status !== "abandoned"); - } - this.setTodoPhases(phases.filter(p => p.tasks.length > 0)); + this.setTodoPhases(phases); } #cloneTodoPhases(phases: TodoPhase[]): TodoPhase[] {