Scheduled workflows fail to launch on folder-backed (non-git) projects — runner aborts on git rev-parse
- Dominant language
- No language data
- Stars
- 2.1k
- Forks
- 153
- PR merge metrics
- No merged PRs in 30d
Description
### Affected version or release
GitHub Copilot desktop app on Windows (agentic harness v1.0.71). Exact app build unknown.
### Installation context
Local **folder-backed project** (a plain directory that is not a git repository; `member_repositories: []`). Workflow created in that project.
### What happened?
A scheduled workflow created in a folder-backed (non-git) project fails to launch. Both the on-demand run and the scheduled trigger abort immediately with:
```
Failed to read current branch from : git ["rev-parse", "--abbrev-ref", "HEAD"] failed: fatal: not a git repository (or any of the parent directories): .git
```
The saved workflow reports `"workspaceType": "branch"` even though the project is a plain folder with no git repo. An **interactive session** runs fine in the exact same folder — only the workflow runner hard-requires a git branch, so scheduled workflows are unusable for folder projects.
### Steps to reproduce
1. Create a project from a local folder that is **not** a git repository.
2. Create a scheduled workflow in that project (e.g. daily at 9am).
3. Trigger a run (on-demand "Run now", or wait for the schedule).
4. The run fails immediately with the `not a git repository` error above.
### Expected behavior
Workflows should launch in folder-backed projects the same way interactive sessions do (which already work in the same folder). The runner should not require `git rev-parse --abbrev-ref HEAD` to succeed when the project has no git repo — it should fall back to a branchless/folder session rather than aborting.
### Additional context
- Interactive sessions in the same folder work without issue; only the workflow runner fails.
- Saved workflow shows `workspaceType: "branch"` for a folder project, which looks like the root cause (branch workspace assumed regardless of project kind).
- Likely related to other non-git / folder session gaps tracked in the repo.
Contributor guide
Assessment
This issue has not been assessed yet.