Skip to content

Safeoutputs backend starts after gateway timeout, remains at zero tools, and workflow reports success #46847

Description

@jonathanpeppers

Summary

A configured safeoutputs MCP backend can exceed MCP Gateway's 30-second startup timeout, become healthy later, but remain permanently registered with zero tools. The agent then cannot emit any safe output, and the workflow still concludes successfully.

Observed in the public Android PR Reviewer run:
https://github.com/dotnet/android/actions/runs/29618719353

Environment

  • gh-aw compiler: v0.81.6
  • Copilot CLI: 1.0.65
  • MCP Gateway: v0.3.30
  • Safeoutputs MCP server: v1.0.0
  • Workflow safe outputs:
    • create-pull-request-review-comment
    • submit-pull-request-review

The workflow source correctly configured both review safe outputs. The generated lock file omitted gateway.startupTimeout, so MCP Gateway used its 30-second default.

What happened

MCP Gateway launched the safeoutputs stdio backend, timed out after 30 seconds, and recorded zero tools:

[2026-07-17T22:45:28.047Z] [launcher:launcher] Startup timeout occurred: serverID=safeoutputs, timeout=30s
[2026-07-17T22:45:28.047Z] [launcher:launcher] Recorded server error: serverID=safeoutputs, error=server startup timeout after 30s
[2026-07-17T22:45:28.067Z] [cmd:root] Writing server config: name=safeoutputs, url=http://127.0.0.1:8080/mcp/safeoutputs, toolCount=0
[2026-07-17T22:45:28.650Z] [launcher:launcher] Server state: serverID=safeoutputs, status=error, lastError=server startup timeout after 30s
[2026-07-17T22:45:28.849Z] [server:unified] GetToolsForBackend: backendID=safeoutputs, found=0 tools
[2026-07-17T22:45:28.850Z] [server:routed] Backend safeoutputs has 0 tools available

The backend became ready about 30 seconds later and correctly registered all configured tools:

[2026-07-17T22:45:58.288Z] [safeoutputs] Registered tool: create_pull_request_review_comment
[2026-07-17T22:45:58.288Z] [safeoutputs] Registered tool: submit_pull_request_review
[2026-07-17T22:45:58.288Z] [safeoutputs] Registered tool: missing_tool
[2026-07-17T22:45:58.288Z] [safeoutputs] Registered tool: noop
[2026-07-17T22:45:58.288Z] [safeoutputs] Registered tool: missing_data
[2026-07-17T22:45:58.289Z] [safeoutputs] Registered tool: report_incomplete
[2026-07-17T22:45:58.289Z] [safeoutputs] Registered tool: create_report_incomplete_issue
[2026-07-17T22:45:58.290Z] [safeoutputs] listening...

The gateway health monitor subsequently saw the backend running, but the routed backend still exposed zero tools:

[2026-07-17T22:46:28.055Z] [launcher:launcher] Server state: serverID=safeoutputs, status=running, startedAt=2026-07-17 22:45:58.295773986 +0000 UTC

The agent completed the review but could not call either review safe-output tool. agent_output.json contained:

{"items":[],"errors":[]}

gh aw audit 29618719353 --json reported:

conclusion: success
safe_output_summary.total_items: 0
actuation_style: read_only

The activation comment was updated to say the reviewer completed successfully even though no review was posted.

Expected behavior

One or more of the following should prevent silent data loss:

  1. gh-aw should propagate tools.startup-timeout (documented default: 120 seconds) to MCP Gateway's top-level gateway.startupTimeout.
  2. MCP Gateway should retry tool discovery when a timed-out backend later becomes healthy.
  3. A workflow with configured safe outputs should not report success when the safe-output backend is unavailable and the agent cannot call report_incomplete.

Actual behavior

The gateway permanently cached zero safe-output tools after the initial timeout, while health monitoring later reported the backend as running. The workflow completed successfully with no visible review.

Additional context

The current gh-aw gateway configuration type/rendering appears not to expose MCP Gateway's supported startupTimeout field. Upgrading alone may not address the issue: MCP Gateway's schema still defaults startup to 30 seconds unless that field is emitted.

Metadata

Metadata

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions