Skip to content

Agent loses context and halts after first session compaction #2871

@maxcleme

Description

@maxcleme

Description

After the first session compaction, the agent stops mid-task and responds as if it has no conversation history, outputting something like:

Image

This breaks the agent's current thought process entirely. The only workaround is to re-enter the original prompt manually, after which it manages to continue — but all in-progress state is lost.

Steps to Reproduce

  1. Start a docker-agent session with a multi-agent setup
  2. Let the session run until the first compaction triggers
  3. Observe the agent halt and output the "no conversation history" message
  4. Re-enter the original prompt to confirm the agent can resume

Expected Behavior

The agent should handle compaction transparently and continue its work without interruption or loss of context.

Actual Behavior

  • Agent halts immediately after the first compaction
  • Outputs a confused "no history" message
  • Breaks the thought process of the agent team
  • Requires manual intervention to resume

Additional Context

  • Happens on the first compaction, not subsequent ones
  • Appeared recently with no changes to the main .yaml config — this is a regression
  • Re-prompting does allow the agent to continue, suggesting the compacted context is not fully lost — the agent just fails to resume autonomously

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/agentFor work that has to do with the general agent loop/agentic features of the apparea/sessionsFor features/issues/fixes related to session lifecycle (resume, persistence, export)kind/fixPR fixes a bug (maps to fix: commit prefix)

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions