Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 15, 2026

The Smoke Codex workflow fails with exit code 7 when the MCP gateway health check curl command cannot connect. With set -e enabled, the script exits immediately before reaching error diagnostics.

Changes

Modified actions/setup/sh/start_mcp_gateway.sh:

  • Temporarily disable set -e around curl call to capture exit code
  • Log curl exit code for debugging
  • Re-enable set -e after capture
# Before: Script exits immediately on curl failure
RESPONSE=$(curl -s --retry 120 ... "http://localhost:8080/health" 2>&1)

# After: Capture exit code, proceed to diagnostics
set +e
RESPONSE=$(curl -s --retry 120 ... "http://localhost:8080/health" 2>&1)
CURL_EXIT_CODE=$?
set -e

This allows the script to reach health validation logic that logs gateway status, process info, and network connectivity instead of silently failing with exit code 7.

Original prompt

This section details on the original issue you should resolve

<issue_title>[aw] Smoke Codex failed</issue_title>
<issue_description>## Problem

The agentic workflow Smoke Codex has failed. This typically indicates a configuration or runtime error that requires user intervention.

Failed Run

How to investigate

Use the debug-agentic-workflow agent to investigate this failure.

In GitHub Copilot Chat, type /agent and select debug-agentic-workflow.

When prompted, provide the workflow run URL: https://github.com/githubnext/gh-aw/actions/runs/20897369313

The debug agent will help you:

  • Analyze the failure logs
  • Identify the root cause
  • Suggest fixes for configuration or runtime errors

Generated from Smoke Codex

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


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits January 15, 2026 02:39
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
The curl command with --retry-all-errors exits with code 7 (connection failure)
when it cannot connect even after retries. With 'set -e', this caused the script
to exit immediately before reaching health check validation.

Changes:
- Temporarily disable errexit around curl call to capture exit code
- Add curl exit code to debug output for better troubleshooting
- Re-enable errexit after capturing the exit code

This allows the script to properly handle connection failures and provide
detailed error messages instead of exiting prematurely with exit code 7.

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix Smoke Codex workflow failure Fix MCP gateway health check curl exit handling Jan 15, 2026
Copilot AI requested a review from mnkiefer January 15, 2026 02:54
@pelikhan pelikhan marked this pull request as ready for review January 15, 2026 04:20
@pelikhan pelikhan merged commit 22c39a0 into main Jan 15, 2026
@pelikhan pelikhan deleted the copilot/debug-smoke-codex-workflow branch January 15, 2026 04:20
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.

[aw] Smoke Codex failed

3 participants