Skip to content

Conversation

@ndarilek
Copy link
Contributor

@ndarilek ndarilek commented Jan 22, 2026

Track lastUserMessage().id changes instead of session ID changes when
syncing agent state. Previously, compaction would create a new user
message with the current agent mode (e.g., "plan"), but since the
session ID stayed the same, the agent state was never synced from it.

Fixes #8349

adamdotdevin and others added 2 commits January 22, 2026 14:04
Track lastUserMessage().id changes instead of session ID changes when
syncing agent state. Previously, compaction would create a new user
message with the current agent mode (e.g., "plan"), but since the
session ID stayed the same, the agent state was never synced from it.

Fixes anomalyco#8349
@github-actions
Copy link
Contributor

Hey! Your PR title preserve agent state doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

Based on my search, I found some potentially related PRs:

Most Relevant:

Windows/Path Related:

These PRs could be related to your changes around agent state preservation and Windows path handling. However, none appear to be direct duplicates of PR #10101. The closest related work seems to be PR #7104 on compaction and PR #7206 on TUI agent tasks.

@ndarilek ndarilek changed the title preserve agent state fix(tui): preserve agent state after compaction Jan 22, 2026
@github-actions
Copy link
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Model selection is "lost" on continuation and Agent selection is "lost" on compaction

2 participants