Skip to content

[WIP] Fix Copilot CLI silent exit with code 1 in v0.67.3#25495

Closed
Copilot wants to merge 1 commit intomainfrom
copilot/fix-copilot-cli-exit-code-1
Closed

[WIP] Fix Copilot CLI silent exit with code 1 in v0.67.3#25495
Copilot wants to merge 1 commit intomainfrom
copilot/fix-copilot-cli-exit-code-1

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 9, 2026

Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.


This section details on the original issue you should resolve

<issue_title>Copilot CLI exits with code 1 silently when compiled with v0.67.3 (pre-release)</issue_title>
<issue_description>## Summary

Workflows compiled with gh-aw v0.67.3 (pre-release) fail silently — the Copilot CLI exits with code 1 after ~5 seconds, producing zero output. The same workflow compiled with v0.67.1 (latest stable) works fine.

Reproduction

  1. Create a minimal workflow:
---
description: Minimal test workflow
engine:
  id: copilot
on:
  workflow_dispatch:
permissions:
  contents: read
tools:
  bash: true
safe-outputs:
  noop:
timeout-minutes: 5
---

Say "Hello from gh-aw!" and then call noop with the message "test successful".
  1. Compile with gh aw v0.67.3: gh aw compile

  2. Push and trigger via workflow_dispatch

  3. The agent job starts, containers come up healthy, but the Copilot CLI exits with code 1 after ~5 seconds with no output

  4. Recompile the same workflow with v0.67.1: works perfectly

Observed behavior (v0.67.3)

  • pre_activation: success
  • activation: success
  • agent: failure — Copilot CLI exits with code 1, zero inference output
  • detect_inference_access_error: false (token is valid)
  • The CLI starts, health checks pass, then immediately exits:
[entrypoint] Unsetting sensitive tokens from parent shell environment...
[entrypoint] Unset COPILOT_GITHUB_TOKEN from /proc/1/environ
[SUCCESS] Containers stopped successfully
[WARN] Command completed with exit code: 1

Expected behavior

The Copilot CLI should run inference and execute the agent prompt, as it does with v0.67.1.

Environment

Additional context

We also observed a possibly related issue: the MCP gateway v0.2.16 (used in v0.67.3 compiled lock files) filters out all tools when tools: ["*"] is set, keeping 0 of N tools. The v0.2.16 release notes say ["*"] should allow all tools, but the wildcard appears to be treated as a literal tool name. This was observed in a separate run: [allowed-tools] Filtered 6 tools from elastic-docs: keeping 0 of 6.</issue_description>

Comments on the Issue (you are @copilot in this section)

@pelikhan /plan open sub issue for the tool filtering issue in the gateway @pelikhan @copilot focus on diagnosing the copilot start issue

@pelikhan pelikhan closed this Apr 9, 2026
Copilot stopped work on behalf of pelikhan due to an error April 9, 2026 15:45
Copilot AI requested a review from pelikhan April 9, 2026 15:45
@github-actions github-actions Bot deleted the copilot/fix-copilot-cli-exit-code-1 branch April 17, 2026 02:59
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.

Copilot CLI exits with code 1 silently when compiled with v0.67.3 (pre-release)

2 participants