Before submitting
Area
apps/desktop
Steps to reproduce
-
Open an Azure DevOps Git repository in T3 Code where:
-
The default branch is master.
-
No local or remote main branch exists.
-
Azure CLI and the Azure DevOps extension are installed and authenticated.
-
The repository remote resembles:
https://ORGANIZATION.visualstudio.com/PROJECT/_git/REPOSITORY
-
Confirm the remote default branch:
git symbolic-ref --short refs/remotes/origin/HEAD
Output:
-
Confirm that main does not exist:
git rev-parse --verify main
Output:
fatal: Needed a single revision
-
Create a feature branch:
git switch -c test/t3code-azure-pr
-
Make a small file change.
-
In T3 Code, click Commit, push & PR.
-
Observe that the commit and push complete successfully.
-
The flow then reaches the pull-request preparation/content-generation phase and fails.
-
Check Azure DevOps. The feature branch exists remotely, but no pull request was created.
The underlying Azure CLI behavior can also be reproduced directly:
az repos show --detect true
Output:
ERROR: the following arguments are required: --repository/-r
Providing the repository succeeds:
az repos show \
--detect true \
--repository REPOSITORY \
--query defaultBranch \
--output tsv
Output:
Expected behavior
The Commit, push & PR action should:
- Commit the selected changes.
- Push the feature branch.
- Resolve the Azure DevOps repository’s default branch as
master.
- Generate the PR title and description using the correct
master...HEAD range.
- Create an Azure DevOps pull request from the feature branch into
master.
- Display a success notification with a link to the created pull request.
If the default branch cannot be resolved, T3 Code should stop before generating PR content and display a clear default-branch detection error.
Actual behavior
T3 Code:
-
Successfully commits the changes.
-
Successfully pushes the feature branch.
-
Attempts to resolve the Azure DevOps default branch by running:
az repos show --detect true
Impact
Major degradation or frequent failure
Version or commit
No response
Environment
No response
Logs or stack traces
### 4 — Logs or stack traces
The first relevant failure in the T3 Code server trace is:
VcsProcessExitError: VCS process failed in AzureDevOpsCli.execute:
az (...) exited with 2 - Process exited with a non-zero status.
at VcsProcessExitError.fromProcessExit
at VcsProcess.run
at resolveBaseBranch
at runPrStep
at runStackedAction.runAction
at runStackedAction
The Azure CLI command fails with:
ERROR: the following arguments are required: --repository/-r
https://aka.ms/cli_ref
Read more about the command in reference docs
T3 Code then falls back to `main`, after which the final failure is:
GitCommandError: Git command failed in
GitVcsDriver.readRangeContext.log (...):
Git command exited with a non-zero status.
at readRangeContext
at runPrStep
at runStackedAction.runAction
at runStackedAction
A subsequent attempt can fail in the same flow at:
GitCommandError: Git command failed in
GitVcsDriver.readRangeContext.diffStat (...):
Git command exited with a non-zero status.
Relevant source flow:
apps/server/src/sourceControl/AzureDevOpsCli.ts
getDefaultBranch executes:
args: ["repos", "show", "--detect", "true"]
The required Azure DevOps repository argument is missing.
apps/server/src/git/GitManager.ts
The provider error is suppressed:
const defaultFromProvider = yield* sourceControlProvider(cwd).pipe(
Effect.flatMap((provider) => provider.getDefaultBranch({ cwd })),
Effect.orElseSucceed(() => null),
);
The fallback is hardcoded:
return "main";
That invalid base is later used here:
const baseRangeRef = yield* resolveBaseRangeRef(cwd, baseBranch);
const rangeContext = yield* gitCore.readRangeContext(cwd, baseRangeRef);
Environment:
T3 Code: 0.0.32-nightly.20260803.986
macOS: 26.5.2
Git: 2.53.0
Azure CLI: 2.88.0
Azure DevOps CLI extension: 1.0.6
Source-control provider: Azure DevOps
Screenshots, recordings, or supporting files
No response
Workaround
Explicitly configure the merge base for the current feature branch:
git config "branch.$(git branch --show-current).gh-merge-base" master
Then retry the Create PR action in T3 Code.
T3 Code checks this Git configuration before attempting Azure DevOps default-branch detection, so it uses master instead of falling back to main.
The configuration can be verified with:
git config --get "branch.$(git branch --show-current).gh-merge-base"
Expected output:
This is only a per-branch workaround. New feature branches require the same configuration until T3 Code correctly supplies --repository to Azure CLI or resolves the default branch from origin/HEAD.
Before submitting
Area
apps/desktop
Steps to reproduce
Open an Azure DevOps Git repository in T3 Code where:
The default branch is
master.No local or remote
mainbranch exists.Azure CLI and the Azure DevOps extension are installed and authenticated.
The repository remote resembles:
Confirm the remote default branch:
Output:
Confirm that
maindoes not exist:Output:
Create a feature branch:
Make a small file change.
In T3 Code, click Commit, push & PR.
Observe that the commit and push complete successfully.
The flow then reaches the pull-request preparation/content-generation phase and fails.
Check Azure DevOps. The feature branch exists remotely, but no pull request was created.
The underlying Azure CLI behavior can also be reproduced directly:
az repos show --detect trueOutput:
Providing the repository succeeds:
az repos show \ --detect true \ --repository REPOSITORY \ --query defaultBranch \ --output tsvOutput:
Expected behavior
The Commit, push & PR action should:
master.master...HEADrange.master.If the default branch cannot be resolved, T3 Code should stop before generating PR content and display a clear default-branch detection error.
Actual behavior
T3 Code:
Successfully commits the changes.
Successfully pushes the feature branch.
Attempts to resolve the Azure DevOps default branch by running:
az repos show --detect trueImpact
Major degradation or frequent failure
Version or commit
No response
Environment
No response
Logs or stack traces
Screenshots, recordings, or supporting files
No response
Workaround
Explicitly configure the merge base for the current feature branch:
git config "branch.$(git branch --show-current).gh-merge-base" masterThen retry the Create PR action in T3 Code.
T3 Code checks this Git configuration before attempting Azure DevOps default-branch detection, so it uses
masterinstead of falling back tomain.The configuration can be verified with:
git config --get "branch.$(git branch --show-current).gh-merge-base"Expected output:
This is only a per-branch workaround. New feature branches require the same configuration until T3 Code correctly supplies
--repositoryto Azure CLI or resolves the default branch fromorigin/HEAD.