automations: fix: enable supported worktree targets - #335593
Open
Ulugbek Abdullaev (ulugbekna) wants to merge 8 commits into
Open
automations: fix: enable supported worktree targets#335593Ulugbek Abdullaev (ulugbekna) wants to merge 8 commits into
Ulugbek Abdullaev (ulugbekna) wants to merge 8 commits into
Conversation
Revert 1328607 (#335018) so the worktree availability fix and unrelated provider configuration changes can be reviewed separately. Preserve subsequent main changes and the independent ActionList PR. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e4e70d7c-fbe2-487b-a6c5-177af2abae2f
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e4e70d7c-fbe2-487b-a6c5-177af2abae2f
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e4e70d7c-fbe2-487b-a6c5-177af2abae2f
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e4e70d7c-fbe2-487b-a6c5-177af2abae2f
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e4e70d7c-fbe2-487b-a6c5-177af2abae2f
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e4e70d7c-fbe2-487b-a6c5-177af2abae2f
Consult provider-owned workspace capabilities before accepting an explicit worktree target. Preserve legacy providers and unrelated edits, propagate lookup failures, and cancel pending validation without writing. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e4e70d7c-fbe2-487b-a6c5-177af2abae2f
Keep the saved-branch exception only while Worktree is already selected. After opting out, require available repository branches before enabling isolation again. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e4e70d7c-fbe2-487b-a6c5-177af2abae2f
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Sandeep Somavarapu (@sandy081)Matched files:
Ladislau Szomoru (@lszomoru)Matched files:
|
This was referenced Sep 10, 2026
Base automatically changed from
ulugbekna/revert-automation-config-scope
to
main
September 10, 2026 23:47
Dmitriy Vasyura (dmitrivMS)
approved these changes
Sep 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix falsely disabled automation worktree selection
Contents
Stack and purpose
This is the smaller replacement for the worktree portion of #335018.
It is based on the revert branch in #335591, not directly on main, so this PR's diff contains only the seven worktree/startup fixes. Review and land the revert first, then this PR. The remaining provider configuration changes are held in draft #335595, stacked on this branch.
The goal is that New Worktree is selectable for a supported Codex, Claude, or other Agent Host automation target, while unavailable or non-repository targets are rejected instead of silently promising isolation.
Root cause
The automation dialog read a session-type capability that was hard-coded to Copilot CLI. Codex and Claude therefore appeared unsupported even though the Agent Host owns worktree isolation for their sessions.
The dialog also used the local Git extension to discover every target's repository and branches. That cannot discover repositories on a remote Agent Host. Merely removing the Copilot-only flag would leave remote targets incorrectly unavailable.
Included fixes
The implementation remains provider-neutral in shared Sessions code. Tests cover supported provider choices, remote branch discovery/search, unavailable targets, cancellation and recovery, and startup ordering.
Explicit exclusions
This PR does not change:
Those provider-configuration and custom-agent fixes are held for separate draft review. The shared IME fix is independently tracked in #335578.
Until that IME fix lands, cancelling composition during a pending remote branch search without changing the query can leave the picker loading. Changing the query or reopening it remains the workaround. This smaller PR does not claim to fix that shared-component edge case.
Validation
npm run typecheck-clientpassed.git diff --check, and normal commit hygiene passed.main/release branches; they do not run against this stacked feature-branch base. After the revert lands, retarget this PR to main and require the normal CI before landing.