You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Verify token scopes, repository permissions, and MCP/tool access configuration.
Warning
Engine Failure: The copilot engine terminated unexpectedly.
Last agent output:
{"type":"tool.execution_complete","timestamp":"2026-08-04T18:19:54.321Z","data":{"toolName":"bash","mcpServerName":"","success":true,"result":{"content":"#!/usr/bin/env bash\nset +o histexpand\n\n# Setup Action\n# Copies activation job files to the agent environment\n#\n# This script copies JavaScript (.cjs) and JSON files from the js/ directory\n# and shell scripts from the sh/ directory to the destination directory.\n#\n# The js/ and sh/ directories contain the source of truth for all JavaScript\n# and shell script files. These files are manually edited and committed to git.\n# They are NOT generated by a build process.\n#\n# At runtime, this script copies the files from actions/setup/js/ and\n# actions/setup/sh/ to $RUNNER_TEMP/gh-aw/actions where workflows can access them.\n# Uses $RUNNER_TEMP instead of /opt/gh-aw for compatibility with self-hosted runners\n# that may not have write access to /opt.\n\nset -e\n\n# Capture start time immediately so the OTLP setup span reflects actual setup duration.\n# Falls back to 0 when node is unavailable.\nSETUP_START_MS=$(node -e \"process.stdout.write(String(Date.now()))\" 2>/dev/null || echo \"0\")\n\n# Log a message only when GitHub Actions debug mode is active.\n# Handles both RUNNER_DEBUG=1 and RUNNER_DEBUG=true (GitHub Actions sets 'true').\ndebug_log() {\n if [[ \"${RUNNER_DEBUG:-0}\" == \"1\" || \"${RUNNER_DEBUG:-0}\" == \"true\" ]]; then\n echo \"$@\"\n fi\n}\n\n# Helper: create directories, using sudo on macOS where system directories are root-owned\ncreate_dir() {\n if [[ \"$(uname -s)\" == \"Darwin\" ]] && [[ \"$1\" == /opt/* ]]; then\n sudo mkdir -p \"$1\"\n sudo chown -R \"$(whoami)\" \"$1\"\n else\n mkdir -p \"$1\"\n fi\n}\n\n# GH_AW_ROOT uses RUNNER_TEMP for write access on both GitHub-hosted and self-hosted runners.\n# RUNNER_TEMP is guaranteed to be set by GitHub Actions and is always writable.\nGH_AW_ROOT=\"${RUNNER_TEMP}/gh-aw\"\n\n# Verify RUNNER_TEMP is set and the directory has write access\nif [ -z \"${RUNNER_TEMP}\" ]; then\n echo \"::error::RUNNER_TEMP environment variable is not set. This script must run in a GitHub Actions environment.\"\n exit 1\nfi\n\nif [ ! -d \"${RUNNER_TEMP}\" ]; then\n echo \"::error::RUNNER_TEMP directory does not exist: ${RUNNER_TEMP}\"\n exit 1\nfi\n\nif [ ! -w \"${RUNNER_TEMP}\" ]; then\n echo \"::error::RUNNER_TEMP directory is not writable: ${RUNNER_TEMP}\"\n echo \"::error::The runner user ($(whoami)) does not have write access to ${RUNNER_TEMP}\"\n exit 1\nfi\n\n# Detect tree collision: RUNNER_TEMP must not resolve to /tmp.\n# gh-aw mounts ${RUNNER_TEMP}/gh-aw read-only (setup tree) and /tmp/gh-aw read-write\n# (runtime tree). When RUNNER_TEMP=/tmp both paths collapse into /tmp/gh-aw, giving\n# the agent write access to compiled scripts, prompts, and MCP configs that must stay\n# immutable. Fail fast here rather than silently running with a broken security boundary.\nRESOLVED_RUNNER_TEMP=\"$(cd \"${RUNNER_TEMP}\" && pwd -P)\"\nif [ -z \"${RESOLVED_RUNNER_TEMP}\" ]; then\n echo \"::error::Failed to resolve canonical path for RUNNER_TEMP: ${RUNNER_TEMP}\"\n exit 1\nfi\nif [ \"${RESOLVED_RUNNER_TEMP%/}\" = \"/tmp\" ]; then\n echo \"::error::RUNNER_TEMP resolves to /tmp, which conflicts with gh-aw's runtime tree (/tmp/gh-aw). Please configure your self-hosted runner with a different temp directory to maintain security isolation. See: https://docs.github.com/en/actions/hosting-your-own-runners\"\n exit 1\nfi\n\ndebug_log \"Using RUNNER_TEMP: ${RUNNER_TEMP} (resolved: ${RESOLVED_RUNNER_TEMP}, writable: yes)\"\n\n# Get destination from input or use default\nDESTINATION=\"${INPUT_DESTINATION:-${GH_AW_ROOT}/actions}\"\n\n# Get safe-output-custom-tokens flag from input (default: false)\nSAFE_OUTPUT_CUSTOM_TOKENS_ENABLED=\"${INPUT_SAFE_OUTPUT_CUSTOM_TOKENS:-false}\"\n\ndebug_log \"Copying activation files to ${DESTINATION}\"\ndebug_log \"Safe-output custom tokens support: ${SAFE_OUTPUT_CUSTOM_TOKENS_ENABLED}\"\n\n# Create destination directory if it doesn't exist\ncreate_dir \"${DESTINATION}\"\ndebug_log \"Created directory: ${DESTINATION}\"\n\n# Remove and recreate /tmp/gh-aw directory to ensure a clean state.\n# On persistent runners, a previous AWF run may leave this directory (or subdirectories\n# like sandbox/firewall/) owned by root. Plain rm -rf fails with EACCES in that case,\n# so we fall back to sudo rm -rf which is available passwordless on GitHub-hosted runners.\n#\n# The reset is skipped when the runtime tree already holds the current run's state.\n# setup.sh can be re-executed from inside a running workflow (for example a workflow\n# whose custom steps run this repository's test suite, which shells out to setup.sh).\n# Wiping /tmp/gh-aw at that point deletes the activation prompt that was already\n# downloaded into /tmp/gh-aw/aw-prompts/prompt.txt, and the agent then fails with\n# \"failed to read prompt file /tmp/gh-aw/aw-prompts/prompt.txt: ENOENT\".\n# GH_AW_SKIP_TMP_RESET=1 disables the reset explicitly for the same reason.\nSKIP_TMP_RESET=\"\"\nif [ \"${GH_AW_SKIP_TMP_RESET:-0}\" = \"1\" ]; then\n SKIP_TMP_RESET=\"GH_AW_SKIP_TMP_RESET=1\"\nelif [ -f /tmp/gh-aw/aw-prompts/prompt.txt ]; then\n SKIP_TMP_RESET=\"an activation prompt is already present\"\nfi\n\nif [ -n \"${SKIP_TMP_RESET}\" ]; then\n debug_log \"Skipping /tmp/gh-aw reset: ${SKIP_TMP_RESET}\"\nelif [ -d /tmp/gh-aw ] && [ ! -w /tmp/gh-aw ]; then\n debug_log \"/tmp/gh-aw exists but is not writable (likely root-owned from prior run); using sudo to remove\"\n if command -v sudo >/dev/null 2>&1; then\n sudo -n rm -rf /tmp/gh-aw\n else\n echo \"::error::/tmp/gh-aw exists but is not writable, and sudo is not available to reclaim it.\"\n exit 1\n fi\nelif [ -d /tmp/gh-aw ]; then\n # Directory is writable — but subdirectories may not be (e.g., sandbox/firewall/ owned by root).\n # Attempt plain rm first; if it fails, escalate to sudo.\n if ! rm -rf /tmp/gh-aw 2>/dev/null; then\n debug_log \"/tmp/gh-aw has non-writable children (likely root-owned from prior AWF run); using sudo to remove\"\n if command -v sudo >/dev/null 2>&1; then\n sudo -n rm -rf /tmp/gh-aw\n else\n echo \"::error::/tmp/gh-aw contains non-writable children, and sudo is not available to reclaim it.\"\n exit 1\n fi\n fi\nfi\nmkdir -p /tmp/gh-aw\ndebug_log \"Created /tmp/gh-aw directory\"\n\n# Get the directory where this script is located\nSCRIPT_DIR=\"$(cd \"$(dirname \"${BASH_SOURCE[0]}\")\" && pwd)\"\n<shellId: 2 completed with exit code 0>","detailedContent":"#!/usr/bin/env bash\nset +o histexpand\n\n# Setup Action\n# Copies activation job files to the agent environment\n#\n# This script copies JavaScript (.cjs) and JSON files from the js/ directory\n# and shell scripts from the sh/ directory to the destination directory.\n#\n# The js/ and sh/ directories contain the source of truth for all JavaScript\n# and shell script files. These files are manually edited and committed to git.\n# They are NOT generated by a build process.\n#\n# At runtime, this script copies the files from actions/setup/js/ and\n# actions/setup/sh/ to $RUNNER_TEMP/gh-aw/actions where workflows can access them.\n# Uses $RUNNER_TEMP instead of /opt/gh-aw for compatibility with self-hosted runners\n# that may not have write access to /opt.\n\nset -e\n\n# Capture start time immediately so the OTLP setup span reflects actual setup duration.\n# Falls back to 0 when node is unavailable.\nSETUP_START_MS=$(node -e \"process.stdout.write(String(Date.now()))\" 2>/dev/null || echo \"0\")\n\n# Log a message only when GitHub Actions debug mode is active.\n# Handles both RUNNER_DEBUG=1 and RUNNER_DEBUG=true (GitHub Actions sets 'true').\ndebug_log() {\n if [[ \"${RUNNER_DEBUG:-0}\" == \"1\" || \"${RUNNER_DEBUG:-0}\" == \"true\" ]]; then\n echo \"$@\"\n fi\n}\n\n# Helper: create directories, using sudo on macOS where system directories are root-owned\ncreate_dir() {\n if [[ \"$(uname -s)\" == \"Darwin\" ]] && [[ \"$1\" == /opt/* ]]; then\n sudo mkdir -p \"$1\"\n sudo chown -R \"$(whoami)\" \"$1\"\n else\n mkdir -p \"$1\"\n fi\n}\n\n# GH_AW_ROOT uses RUNNER_TEMP for write access on both GitHub-hosted and self-hosted runners.\n# RUNNER_TEMP is guaranteed to be set by GitHub Actions and is always writable.\nGH_AW_ROOT=\"${RUNNER_TEMP}/gh-aw\"\n\n# Verify RUNNER_TEMP is set and the directory has write access\nif [ -z \"${RUNNER_TEMP}\" ]; then\n echo \"::error::RUNNER_TEMP environment variable is not set. This script must run in a GitHub Actions environment.\"\n exit 1\nfi\n\nif [ ! -d \"${RUNNER_TEMP}\" ]; then\n echo \"::error::RUNNER_TEMP directory does not exist: ${RUNNER_TEMP}\"\n exit 1\nfi\n\nif [ ! -w \"${RUNNER_TEMP}\" ]; then\n echo \"::error::RUNNER_TEMP directory is not writable: ${RUNNER_TEMP}\"\n echo \"::error::The runner user ($(whoami)) does not have write access to ${RUNNER_TEMP}\"\n exit 1\nfi\n\n# Detect tree collision: RUNNER_TEMP must not resolve to /tmp.\n# gh-aw mounts ${RUNNER_TEMP}/gh-aw read-only (setup tree) and /tmp/gh-aw read-write\n# (runtime tree). When RUNNER_TEMP=/tmp both paths collapse into /tmp/gh-aw, giving\n# the agent write access to compiled scripts, prompts, and MCP configs that must stay\n# immutable. Fail fast here rather than silently running with a broken security boundary.\nRESOLVED_RUNNER_TEMP=\"$(cd \"${RUNNER_TEMP}\" && pwd -P)\"\nif [ -z \"${RESOLVED_RUNNER_TEMP}\" ]; then\n echo \"::error::Failed to resolve canonical path for RUNNER_TEMP: ${RUNNER_TEMP}\"\n exit 1\nfi\nif [ \"${RESOLVED_RUNNER_TEMP%/}\" = \"/tmp\" ]; then\n echo \"::error::RUNNER_TEMP resolves to /tmp, which conflicts with gh-aw's runtime tree (/tmp/gh-aw). Please configure your self-hosted runner with a different temp directory to maintain security isolation. See: https://docs.github.com/en/actions/hosting-your-own-runners\"\n exit 1\nfi\n\ndebug_log \"Using RUNNER_TEMP: ${RUNNER_TEMP} (resolved: ${RESOLVED_RUNNER_TEMP}, writable: yes)\"\n\n# Get destination from input or use default\nDESTINATION=\"${INPUT_DESTINATION:-${GH_AW_ROOT}/actions}\"\n\n# Get safe-output-custom-tokens flag from input (default: false)\nSAFE_OUTPUT_CUSTOM_TOKENS_ENABLED=\"${INPUT_SAFE_OUTPUT_CUSTOM_TOKENS:-false}\"\n\ndebug_log \"Copying activation files to ${DESTINATION}\"\ndebug_log \"Safe-output custom tokens support: ${SAFE_OUTPUT_CUSTOM_TOKENS_ENABLED}\"\n\n# Create destination directory if it doesn't exist\ncreate_dir \"${DESTINATION}\"\ndebug_log \"Created directory: ${DESTINATION}\"\n\n# Remove and recreate /tmp/gh-aw directory to ensure a clean state.\n# On persistent runners, a previous AWF run may leave this directory (or subdirectories\n# like sandbox/firewall/) owned by root. Plain rm -rf fails with EACCES in that case,\n# so we fall back to sudo rm -rf which is available passwordless on GitHub-hosted runners.\n#\n# The reset is skipped when the runtime tree already holds the current run's state.\n# setup.sh can be re-executed from inside a running workflow (for example a workflow\n# whose custom steps run this repository's test suite, which shells out to setup.sh).\n# Wiping /tmp/gh-aw at that point deletes the activation prompt that was already\n# downloaded into /tmp/gh-aw/aw-prompts/prompt.txt, and the agent then fails with\n# \"failed to read prompt file /tmp/gh-aw/aw-prompts/prompt.txt: ENOENT\".\n# GH_AW_SKIP_TMP_RESET=1 disables the reset explicitly for the same reason.\nSKIP_TMP_RESET=\"\"\nif [ \"${GH_AW_SKIP_TMP_RESET:-0}\" = \"1\" ]; then\n SKIP_TMP_RESET=\"GH_AW_SKIP_TMP_RESET=1\"\nelif [ -f /tmp/gh-aw/aw-prompts/prompt.txt ]; then\n SKIP_TMP_RESET=\"an activation prompt is already present\"\nfi\n\nif [ -n \"${SKIP_TMP_RESET}\" ]; then\n debug_log \"Skipping /tmp/gh-aw reset: ${SKIP_TMP_RESET}\"\nelif [ -d /tmp/gh-aw ] && [ ! -w /tmp/gh-aw ]; then\n debug_log \"/tmp/gh-aw exists but is not writable (likely root-owned from prior run); using sudo to remove\"\n if command -v sudo >/dev/null 2>&1; then\n sudo -n rm -rf /tmp/gh-aw\n else\n echo \"::error::/tmp/gh-aw exists but is not writable, and sudo is not available to reclaim it.\"\n exit 1\n fi\nelif [ -d /tmp/gh-aw ]; then\n # Directory is writable — but subdirectories may not be (e.g., sandbox/firewall/ owned by root).\n # Attempt plain rm first; if it fails, escalate to sudo.\n if ! rm -rf /tmp/gh-aw 2>/dev/null; then\n debug_log \"/tmp/gh-aw has non-writable children (likely root-owned from prior AWF run); using sudo to remove\"\n if command -v sudo >/dev/null 2>&1; then\n sudo -n rm -rf /tmp/gh-aw\n else\n echo \"::error::/tmp/gh-aw contains non-writable children, and sudo is not available to reclaim it.\"\n exit 1\n fi\n fi\nfi\nmkdir -p /tmp/gh-aw\ndebug_log \"Created /tmp/gh-aw directory\"\n\n# Get the directory where this script is located\nSCRIPT_DIR=\"$(cd \"$(dirname \"${BASH_SOURCE[0]}\")\" && pwd)\"\n<shellId: 2 completed with exit code 0>"}}}
{"type":"assistant.message","timestamp":"2026-08-04T18:20:00.668Z","data":{"content":""}}
{"type":"tool.execution_start","timestamp":"2026-08-04T18:20:00.669Z","data":{"toolName":"bash","mcpServerName":"","command":"cat /tmp/gh-aw/agent/pr-review-comments.json"}}
{"type":"tool.execution_complete","timestamp":"2026-08-04T18:20:00.732Z","data":{"toolName":"bash","mcpServerName":"","success":true,"result":{"content":"[\n {\n \"body\": \"A prompt file is not proof that this tree belongs to the current run. On a persistent/self-hosted runner, a previous interrupted run can leave `prompt.txt`; the next job will then bypass the cleanup t\",\n \"id\": 3714889503,\n \"line\": 110,\n \"path\": \"actions/setup/setup.sh\",\n \"user\": \"Copilot\"\n }\n]\n<shellId: 3 completed with exit code 0>","detailedContent":"[\n {\n \"body\": \"A prompt file is not proof that this tree belongs to the current run. On a persistent/self-hosted runner, a previous interrupted run can leave `prompt.txt`; the next job will then bypass the cleanup t\",\n \"id\": 3714889503,\n \"line\": 110,\n \"path\": \"actions/setup/setup.sh\",\n \"user\": \"Copilot\"\n }\n]\n<shellId: 3 completed with exit code 0>"}}}
{"type":"assistant.message","timestamp":"2026-08-04T18:20:27.726Z","data":{"content":""}}
{"type":"tool.execution_start","timestamp":"2026-08-04T18:20:27.727Z","data":{"toolName":"task","mcpServerName":""}}
{"type":"subagent.started","timestamp":"2026-08-04T18:20:27.737Z","data":{"agentName":"general-purpose","agentDisplayName":"General Purpose Agent","toolCallId":"toolu_01MzaPuu6xFPyFxEmVAZnXou"}}
{"type":"tool.execution_complete","timestamp":"2026-08-04T18:20:27.745Z","data":{"toolName":"task","mcpServerName":"","success":true,"result":{"content":"Agent started in background with agent_id: grumpy-coder. You'll be notified when it completes. Tell the user you're waiting and end your response, or continue unrelated work until notified. The agent supports multi-turn conversations — use write_agent to send follow-up messages.","detailedContent":"Prompt to general-purpose agent (grumpy-coder):\nYou are a grumpy, highly critical code reviewer doing FIRST-PASS issue mining on a small PR diff. Do NOT read any files from the repo except the diff below - just analyze it directly (no need to run any tools, but you may use bash/grep/view if it helps confirm a suspicion about surrounding code in /home/runner/work/gh-aw/gh-aw).\n\nPR: \"Prevent setup.sh from deleting the in-flight activation prompt\" - modifies actions/setup/setup.sh and pkg/cli/setup_action_test.go to skip the `/tmp/gh-aw` reset when an activation prompt file already exists at /tmp/gh-aw/aw-prompts/prompt.txt, or when GH_AW_SKIP_TMP_RESET=1 is set.\n\nDIFF:\n```\ndiff --git a/actions/setup/setup.sh b/actions/setup/setup.sh\nindex 2576943dc53..ce2477f0f76 100755\n--- a/actions/setup/setup.sh\n+++ b/actions/setup/setup.sh\n@@ -95,7 +95,24 @@ debug_log \"Created directory: ${DESTINATION}\"\n # On persistent runners, a previous AWF run may leave this directory (or subdirectories\n # like sandbox/firewall/) owned by root. Plain rm -rf fails with EACCES in that case,\n # so we fall back to sudo rm -rf which is available passwordless on GitHub-hosted runners.\n-if [ -d /tmp/gh-aw ] && [ ! -w /tmp/gh-aw ]; then\n+#\n+# The reset is skipped when the runtime tree already holds the current run's state.\n+# setup.sh can be re-executed from inside a running workflow (for example a workflow\n+# whose custom steps run this repository's test suite, which shells out to setup.sh).\n+# Wiping /tmp/gh-aw at that point deletes the activation prompt that was already\n+# downloaded into /tmp/gh-aw/aw-prompts/prompt.txt, and the agent then fails with\n+# \"failed to read prompt file /tmp/gh-aw/aw-prompts/prompt.txt: ENOENT\".\n+# GH_AW_SKIP_TMP_RESET=1 disables the reset explicitly for the same reason.\n+SKIP_TMP_RESET=\"\"\n+if [ \"${GH_AW_SKIP_TMP_RESET:-0}\" = \"1\" ]; then\n+ SKIP_TMP_RESET=\"GH_AW_SKIP_TMP_RESET=1\"\n+elif [ -f /tmp/gh-aw/aw-prompts/prompt.txt ]; then\n+ SKIP_TMP_RESET=\"an activation prompt is already present\"\n+fi\n+\n+if [ -n \"${SKIP_TMP_RESET}\" ]; then\n+ debug_log \"Skipping /tmp/gh-aw reset: ${SKIP_TMP_RESET}\"\n+elif [ -d /tmp/gh-aw ] && [ ! -w /tmp/gh-aw ]; then\n debug_log \"/tmp/gh-aw exists but is not writable (likely root-owned from prior run); using sudo to remove\"\n if command -v sudo >/dev/null 2>&1; then\n sudo -n rm -rf /tmp/gh-aw\ndiff --git a/pkg/cli/setup_action_test.go b/pkg/cli/setup_action_test.go\nindex 264f09cce45..52fe75c8f35 100644\n--- a/pkg/cli/setup_action_test.go\n+++ b/pkg/cli/setup_action_test.go\n@@ -35,6 +35,9 @@ func TestSetupActionCopiesAntigravityLogParser(t *testing.T) {\n \t\t\"RUNNER_TEMP=\"+runnerTemp,\n \t\t\"INPUT_DESTINATION=\"+destination,\n \t\t\"GITHUB_OUTPUT=\"+githubOutput,\n+\t\t// Never reset /tmp/gh-aw from a test: the test may run inside an agentic\n+\t\t// workflow whose activation prompt already lives there.\n+\t\t\"GH_AW_SKIP_TMP_RESET=1\",\n \t)\n \n \toutput, err := cmd.CombinedOutput()\n@@ -51,3 +54,40 @@ func TestSetupActionCopiesAntigravityLogParser(t *testing.T) {\n \n \tassert.Equal(t, string(sourceContent), string(copiedContent), \"Copied parser should match the source parser\")\n }\n+\n+// TestSetupActionPreservesExistingActivationPrompt verifies that setup.sh does not wipe\n+// /tmp/gh-aw when an activation prompt is already present there. Re-running setup.sh from\n+// inside a live workflow (e.g. a workflow step that runs this repository's test suite)\n+// previously deleted /tmp/gh-aw/aw-prompts/prompt.txt, making the agent fail with\n+// \"failed to read prompt file /tmp/gh-aw/aw-prompts/prompt.txt: ENOENT\".\n+func TestSetupActionPreservesExistingActivationPrompt(t *testing.T) {\n+\twd, err := os.Getwd()\n+\trequire.NoError(t, err, \"Failed to get working directory\")\n+\n+\tprojectRoot := filepath.Join(wd, \"..\", \"..\")\n+\tsetupScript := filepath.Join(projectRoot, \"actions\", \"setup\", \"setup.sh\")\n+\n+\tpromptDir := \"/tmp/gh-aw/aw-prompts\"\n+\tpromptFile := filepath.Join(promptDir, \"prompt.txt\")\n+\tif _, err := os.Stat(promptFile); err == nil {\n+\t\tt.Skip(\"an activation prompt already exists at /tmp/gh-aw/aw-prompts/prompt.txt; not touching it\")\n+\t}\n+\trequire.NoError(t, os.MkdirAll(promptDir, 0o755), \"Failed to create prompt directory\")\n+\tt.Cleanup(func() { _ = os.RemoveAll(promptDir) })\n+\trequire.NoError(t, os.WriteFile(promptFile, []byte(\"test prompt\\n\"), 0o644), \"Failed to write prompt file\")\n+\n+\trunnerTemp := filepath.Join(t.TempDir(), \"runner-temp\")\n+\trequire.NoError(t, os.MkdirAll(runnerTemp, 0o755), \"Failed to create runner temp directory\")\n+\n+\tcmd := exec.Command(\"bash\", setupScript)\n+\tcmd.Env = append(os.Environ(),\n+\t\t\"RUNNER_TEMP=\"+runnerTemp,\n+\t\t\"INPUT_DESTINATION=\"+filepath.Join(runnerTemp, \"gh-aw\", \"actions\"),\n+\t\t\"GITHUB_OUTPUT=\"+filepath.Join(runnerTemp, \"github-output.txt\"),\n+\t)\n+\n+\toutput, err := cmd.CombinedOutput()\n+\trequire.NoError(t, err, \"setup.sh should succeed: %s\", output)\n+\n+\tassert.FileExists(t, promptFile, \"setup.sh must not delete an existing activation prompt\")\n+}\n```\n\nFind every correctness, security, race-condition, and maintainability issue you can, specifically:\n- Is checking only for prompt.txt existence a robust/safe way to detect \"this is my live run's directory\"? Think about stale files from crashed prior runs, security implications of skipping cleanup (could an attacker plant a prompt.txt to make setup.sh skip resetting a compromised /tmp/gh-aw tree with malicious sandbox/firewall/MCP config left from a previous run?).\n- Does this change interact badly with the existing tree-collision check above it (RUNNER_TEMP resolving to /tmp)?\n- Are there TOCTOU races between the check and the subsequent `mkdir -p /tmp/gh-aw`?\n- Is the new test flaky/order-dependent (parallel test runs, shared /tmp/gh-aw path across concurrent test binaries, leftover state)?\n- Anything about the test's use of a hardcoded absolute path /tmp/gh-aw affecting test isolation/parallelism (note: Go tests in the same package run sequentially by default unless t.Parallel() is used - check if it's called).\n- Style/duplication issues in the shell script logic.\n\nOutput STRICT JSONL, one finding per line, each line a JSON object with keys: \"file\", \"line\" (best-guess line number in the new file, integer), \"severity\" (critical/high/medium/low), \"issue\" (one sentence), \"detail\" (fuller explanation). No markdown, no prose outside the JSONL lines."}}}
[copilot-sdk-driver] [sdk-driver] error: Execution failed: Error: No model available. Check policy enablement under GitHub Settings > Copilot
{"type":"subagent.completed","timestamp":"2026-08-04T18:20:27.784Z","data":{"agentName":"general-purpose","toolCallId":"toolu_01MzaPuu6xFPyFxEmVAZnXou"}}
Action Required
Assign this issue to an agent to debug and fix the issue.
Debug with any coding agent
Use this prompt with any coding agent (GitHub Copilot, Claude, Gemini, etc.):
Debug the agentic workflow failure using https://raw.githubusercontent.com/github/gh-aw/main/debug.md
The failed workflow run is at https://github.com/github/gh-aw/actions/runs/30935203223
Manually invoke the agent
Debug this workflow failure using your favorite Agent CLI and the agentic-workflows prompt.
Workflow Failure
Workflow:PR Code Quality Reviewer
Branch: copilot/deep-report-fix-prompt-file-error
Run:https://github.com/github/gh-aw/actions/runs/30935203223
Pull Request:#50341
Warning
Missing Tools Reported: The agent reported missing tools during execution.
Missing Tools:
Alternatives:
Warning
Engine Failure: The
copilotengine terminated unexpectedly.Last agent output:
Action Required
Assign this issue to an agent to debug and fix the issue.
Debug with any coding agent
Use this prompt with any coding agent (GitHub Copilot, Claude, Gemini, etc.):
Manually invoke the agent
Debug this workflow failure using your favorite Agent CLI and the
agentic-workflowsprompt.agentic-workflowsskill from.github/skills/agentic-workflows/SKILL.mdor https://github.com/github/gh-aw/blob/main/.github/skills/agentic-workflows/SKILL.mddebug the agentic workflow pr-code-quality-reviewer failure in https://github.com/github/gh-aw/actions/runs/30935203223Tip
Stop reporting this workflow as a failure
To stop a workflow from creating failure issues, set
report-failure-as-issue: falsein its frontmatter: