Skip to content

Disable compile watch mode in automated environments - #50385

Merged
pelikhan merged 2 commits into
mainfrom
copilot/disable-watch-mode-ci
Aug 4, 2026
Merged

pelikhan merged 2 commits into
mainfrom
copilot/disable-watch-mode-ci

Conversation

Copilot AI commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

gh aw compile --watch can block indefinitely in CI and Copilot coding agent sessions. Agents should use terminating, one-shot compilation instead.

  • Runtime guard

    • Detect Copilot coding agent sessions as automated environments.
    • Reject --watch in CI and coding agent contexts with a clear error.
  • Agent guidance

    • Replace agent-facing --watch recommendations with one-shot gh aw compile instructions.
  • Coverage

    • Add focused cases for CI and Copilot coding agent environments.

Copilot AI and others added 2 commits August 4, 2026 19:58
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI requested a review from pelikhan August 4, 2026 20:06
@pelikhan
pelikhan marked this pull request as ready for review August 4, 2026 20:07
Copilot AI balanced review requested due to automatic review settings August 4, 2026 20:07
@pelikhan
pelikhan merged commit 038c4fa into main Aug 4, 2026
@pelikhan
pelikhan deleted the copilot/disable-watch-mode-ci branch August 4, 2026 20:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Prevents indefinite compile watch sessions in automated environments and updates agent guidance accordingly.

Changes:

  • Detects Copilot coding agent sessions as automated environments.
  • Rejects compile watch mode in CI and agent sessions.
  • Adds focused tests and regenerates affected workflow locks.
Show a summary per file
File Description
pkg/cli/compile_watch_environment_test.go Tests watch-mode rejection.
pkg/cli/compile_orchestrator.go Adds the runtime guard.
pkg/cli/ci.go Detects Copilot agent sessions.
pkg/cli/ci_test.go Tests updated environment detection.
.github/workflows/squad-plan.lock.yml Updates generated metadata.
.github/workflows/squad-game-planner.lock.yml Updates generated metadata.
.github/aw/maintainer.md Recommends one-shot compilation.
.github/aw/instructions.md Removes agent-facing watch guidance.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 8/8 changed files
  • Comments generated: 2
  • Review effort level: Balanced

}

if config.Watch && IsRunningInCI() {
return nil, errors.New("watch mode cannot be used in CI or Copilot coding agent environments")
Comment thread pkg/cli/ci.go
"CI",
"CONTINUOUS_INTEGRATION",
"GITHUB_ACTIONS",
"COPILOT_AGENT_SESSION_ID",
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.85.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants