Skip to content

[Bug]: Diff shows prior branch's changes as deletions after switching checked-out branch mid-thread #8204

Description

@danielo515

Steps to reproduce:

  1. In a thread, ask the agent to make changes on branch A (checked out).
  2. Ask the agent to switch to and make changes on branch B, which gets checked out.
  3. View the diff for the latest turn.

Expected: Diff for the latest turn shows only the changes made on branch B in that turn.

Actual: The changes previously made on branch A appear in the latest turn's diff as deletions (since branch B doesn't have those changes, the diff-against-branch-A-state treats them as removed).

Likely cause: The diff is computed against a stale base ref (the previously checked-out branch) instead of the newly checked-out branch's actual base.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions