I'm experiencing a reproducible issue where, after PI Desktop performs context compaction, the agent sometimes **loses the current task/continuation state and starts working on an older task from earlier in the session**.
This is more than simply forgetting a detail from the conversation.
The problem is that the agent can appear to **switch back to a previously completed/unrelated task** after compaction.
For example, I was working through a long software project using a strict workflow:
> Implement one fix → report results → wait for approval → move to the next fix.
Before compaction, the active task was clearly:
1. Start a long-running coding/agent session.
2. Work through multiple sequential tasks and explicitly complete older tasks.
3. Start a new task with clear constraints and an approval-gated workflow.
4. Continue the session until PI Desktop performs context compaction.
5. Allow the agent to continue after compaction.
6. Observe that the agent may begin executing an older completed/unrelated task instead of continuing the current task.
7. In some cases, it can begin making real workspace changes belonging to that older task.
问题描述 / Description
复现步骤 / Steps to reproduce
截图 / Screenshots