Skip to content

Conversation

@DonJayamanne
Copy link
Collaborator

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an issue where Background Agent requests would incorrectly create duplicate sessions when a tool call was pending for an untitled session. The fix introduces a mapping to track untitled session IDs to their corresponding real session IDs, preventing duplicate session creation during subsequent requests to the same untitled session.

  • Adds untitledSessionIdMapping to track the relationship between untitled session IDs and their real session IDs
  • Introduces isNewSession logic that distinguishes between first-time untitled sessions and subsequent requests to already-created untitled sessions
  • Updates session creation, worktree management, and cleanup logic to use the new isNewSession check

@DonJayamanne DonJayamanne marked this pull request as ready for review December 12, 2025 00:29
@DonJayamanne DonJayamanne added the candidate Issue identified as probable candidate for fixing in the next release label Dec 12, 2025
@joshspicer joshspicer merged commit 7ad0e5b into release/0.35 Dec 15, 2025
22 checks passed
@joshspicer joshspicer deleted the don/recovery2.1Swap branch December 15, 2025 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

candidate Issue identified as probable candidate for fixing in the next release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants