Skip to content

Explain Copilot driver exit 80 and harden threat spec optimizer shell use - #78226

Merged
pelikhan merged 4 commits into
mainfrom
pelikhan/copilot-driver-exit-80
Nov 16, 2026
Merged

pelikhan merged 4 commits into
mainfrom
pelikhan/copilot-driver-exit-80

Conversation

@pelikhan

Copy link
Copy Markdown
Collaborator

Daily Compiler Threat Spec Optimizer run 43792391517 failed with Copilot driver exit code 80. Issue #78208 reported this as Driver exit meaning: Unknown (engine-specific exit code), which gave no actionable diagnosis.

Exit 80 is gh-aw's own WORKFLOW_TOOL_PERMISSION_DENIED_EXIT_CODE. The SDK driver uses it when max-tool-denials is reached; in this run that was "max tool denials threshold reached (3/3)". The agent used commands outside tools.bash: python3, mkdir inside a for loop, and paste.

Changes

  • empty_output_outcome.cjs: for the copilot engine only, gh-aw's reserved driver exit codes now have meanings:

    • 80: "Workflow tool permission denials reached the max-tool-denials limit ..."
    • 79: "Copilot main-session model verification failed"

    Other engines keep "Unknown (engine-specific exit code)" because they may reuse these numbers. failureCause stays driver_crash, so downstream consumers are unchanged.

  • daily-compiler-threat-spec-optimizer.md: the Tooling Constraint now:

    • lists the full effective allowlist, including the defaults and the github CLI;
    • explains that every command in a pipeline, chain, or loop must be allowed, and that the run aborts after 3 denials;
    • forbids python3, node, jq, mkdir, paste, xargs and tee.

    The allowlist itself is not broadened. The lock change is hash-only.

Validation

  • empty_output_outcome.test.cjs: 156/156 pass, including new cases for copilot 80/79 and claude 80.
  • Replaying the real run artifacts through the patched collector produces the new exit-80 meaning.
  • make recompile and make agent-report-progress pass.
  • Recurrence check: gh aw logs --engine copilot --start-date -3d found no other failure at the Copilot execute step in 126 runs. The scan hit its count limit, so it may not cover the full 3 days.

Relates to #78208

… use

Copilot SDK driver exits 80 (WORKFLOW_TOOL_PERMISSION_DENIED_EXIT_CODE) when
max-tool-denials is reached, and 79 on model verification failure. The
empty-output collector reported these as 'Unknown (engine-specific exit code)'.
Map them for the copilot engine only.

Daily Compiler Threat Spec Optimizer run 43792391517 hit 3/3 denials using
python3, mkdir in a loop, and paste. Spell out the full allowlist, the github
CLI, and forbidden commands in the prompt.

Co-authored-by: Copilot App <[email protected]>
@pelikhan
pelikhan marked this pull request as ready for review November 16, 2026 03:21
Copilot AI adaptive review requested due to automatic review settings November 16, 2026 03:21
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

PR Code Quality Reviewer

Outcome: reported_action

The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt56 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.5K · ◷

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft.

Design Decision Gate 🏗️

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

🏗️ ADR gate enforced by Design Decision Gate 🏗️ · pi · routed: haiku55 xhigh · ~1 AIC · ⌖ ~2 AIC · ⊞ 8.6K · ◷

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Ponytail Reviewer

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated by Ponytail Reviewer for #78226 · codex · routed: gpt61 medium · ~4 AIC · ⌖ ~1 AIC · ⊞ 185 · ◷

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Specification Reviewer completed successfully!

Caution

agentic threat detected
Threat detection flagged this output in warn mode. Manual review is REQUIRED before any follow-up automation.

Details

Potential security threats were detected in the agent output. Detected threat types: prompt injection.

Review the workflow run logs for details.

PR Specification Reviewer

Outcome: reported_action

The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated by PR Specification Reviewer for #78226 · copilot · gpt56 · ~3 AIC · ⌖ ~2 AIC · ⊞ 1.6K · ◷

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

🧪 Test quality analysis by Test Quality Sentinel · copilot · routed: haiku55 xhigh · ~1 AIC · ⌖ ~2 AIC · ⊞ 7.3K · ◷

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~7 AIC · ⌖ ~2 AIC · ⊞ 6.7K · ◷

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (pr-code-quality-reviewer)
reviewed_at: 2026-11-16T03:24:37Z
review_event: REQUEST_CHANGES
top_themes: malformed workflow event handling in empty-output diagnostics
files_reviewed: actions/setup/js/empty_output_outcome.cjs, actions/setup/js/empty_output_outcome.test.cjs, actions/setup/js/copilot_model_selection.cjs, actions/setup/js/permission_denied_helpers.cjs, .github/workflows/daily-compiler-threat-spec-optimizer.md
comment_count: 1
History

Note

This comment is managed by comment memory.

Expand the saved memory block to view or edit the persistent context for this thread.
Edit only the text inside the backtick fences; workflow metadata and the footer are regenerated automatically.

Learn more about comment memory

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.5K · ◷
Comment /review to run again

@github-actions github-actions Bot 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.

Found one correctness issue: the new engine-ID fallback can throw on malformed workflow.info events because data is not optional-chained. This is in the empty-output failure path, so it can suppress the diagnostic outcome itself. Please guard data and add a regression test.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.5K
Comment /review to run again

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (spec-review-history)
{"id":"ldg-2f7a8026-4bbd-41c7-b395-72cbc815aa10","parents":[],"payload":{"id":"ldg-352a95eb-7543-4af0-939f-a79a9d6fdfc5","operation":"append","value":{"finding_count":0,"head_sha":"07fa651a0cedfd6d6d41e600c246a885f6d465fd","outcome":"aligned"}},"sha":"sha256:7eb03413c27a8e093db5c7b56edc97008670b41f4be5571638bf3231285a0c58","timestamp":"2026-11-16T03:28:43.206Z","type":"ledger_append","version":1}
History

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (review-history)
{"id":"ldg-6c889d6a-956c-4b2f-8bf5-ee00bcb069ec","parents":[],"payload":{"id":"ldg-8a907cc8-a4da-49fc-b28e-b735eb53caef","operation":"append","value":{"finding_count":1,"head_sha":"07fa651a0cedfd6d6d41e600c246a885f6d465fd","outcome":"findings"}},"sha":"sha256:74c7f9b15df4253ad17acbb1767870489127d647fef12896ff3d95c84455f070","timestamp":"2026-11-16T03:29:33.830Z","type":"ledger_append","version":1}
History

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.

🟡 Changes recommended

The exit-80 message incorrectly reports denial-limit exhaustion when a single tool denial followed by a session error can also cause that exit code.

1 open issue
What changed in this PR

This PR improves gh-aw’s Copilot failure diagnostics and clarifies shell restrictions for the daily compiler threat spec optimizer, addressing the failure reported in #78208.

Changes:

  • Adds Copilot-specific descriptions for driver exit codes 79 and 80 while preserving the driver_crash classification.
  • Adds tests for engine-specific exit-code meanings.
  • Expands workflow tooling instructions without broadening permissions and refreshes generated hashes.
File Description
actions/​setup/​js/​empty_output_outcome.test.cjs Tests Copilot exit meanings and another engine’s fallback.
actions/​setup/​js/​empty_output_outcome.cjs Adds engine-scoped meanings for reserved exit codes.
.github/​workflows/​daily-compiler-threat-spec-optimizer.md Clarifies allowed commands and denial limits.
.github/​workflows/​daily-compiler-threat-spec-optimizer.lock.yml Refreshes body and admission hashes.

Review effort: Balanced (dynamic)

@pelikhan

Copy link
Copy Markdown
Collaborator Author

Re bot status/memory comments 6906383262, 6906383393, 6906383601, 6906384973, 6906385052, 6906385382, 6906463455, 6906467188, 6906478576: no code change needed. These are workflow completion, reaction, and comment-memory records; the only actionable findings (the malformed workflow.info guard and the exit 80 wording) are addressed in 6e14064 and cdb0a5c. The PR Specification Reviewer threat-detection warning refers to its own run output, not to this diff.

@github-actions github-actions Bot 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.

Skills-Based Review 🧠

Applied /diagnosing-bugs, /tdd, and /codebase-design. No blocking issues. Three non-blocking inline comments.

📋 Key Themes & Highlights

Key Themes

  • Engine gating: exit 80/79 meanings apply only to copilot, which is correct because other engines may reuse those numbers.
  • Edge cases: ?? lets an empty GH_AW_ENGINE_ID skip the workflow.info fallback. The tests cover the env path but not the fallback.
  • Open question: the new prompt tells the agent to use github <tool> --owner --repo. The mount code excludes github from CLI mounting for mode: local, so please confirm this CLI is exposed in this workflow.
  • Unverified: the lock body_hash change could not be reproduced locally. Running make recompile on the committed .md would confirm it.

Positive Highlights

  • ✅ WORKFLOW_TOOL_PERMISSION_DENIED_EXIT_CODE and COPILOT_MODEL_VERIFICATION_EXIT_CODE are imported from their sources, not hard-coded.
  • ✅ failureCause stays driver_crash, so downstream consumers are unaffected.
  • ✅ The default bash allowlist in the prompt matches DefaultBashTools.

@copilot please address the review comments above.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~7 AIC · ⌖ ~2 AIC · ⊞ 6.7K
Comment /matt to run again

@pelikhan
pelikhan merged commit 9ace262 into main Nov 16, 2026
59 of 60 checks passed
@pelikhan
pelikhan deleted the pelikhan/copilot-driver-exit-80 branch November 16, 2026 03:51
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v1.3.0

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants