Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 22, 2026

The smoke test workflow failed when the MCP gateway attempted to list tools from the safe-inputs HTTP server, receiving:

{"error":{"code":-32001,"message":"Session not found"},"id":2}

This prevented the safeinputs-gh tool from being registered, making GitHub CLI operations unavailable to agents.

Root Cause

Safe-inputs MCP HTTP server ran in stateful mode, requiring session initialization before tools/list RPC calls. The MCP gateway connects to HTTP servers expecting stateless mode (no session required).

Changes

Changed safe-inputs server from stateful to stateless mode:

// pkg/workflow/safe_inputs_generator.go
startHttpServer(configPath, {
  port: port,
  stateless: true,  // was: false
  logDir: "/opt/gh-aw/safe-inputs/logs"
})

Recompiled all 134 workflow lock files to propagate the change.

Impact

  • MCP gateway can now successfully list safe-inputs tools without session establishment
  • safeinputs-gh tool becomes available for authenticated GitHub CLI operations
  • Smoke test "Safe Inputs GH CLI Testing" requirement should pass
Original prompt

Reference: https://github.com/githubnext/gh-aw/actions/runs/21252861974/job/61159106886

Review gateway and safeinputs logs to determine why it failed.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits January 22, 2026 15:08
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Changed safe-inputs MCP HTTP server to use stateless mode
- Root cause: Gateway expects stateless HTTP servers by default
- Fix: Set stateless: true in generateSafeInputsMCPServerScript
- Recompiled all workflow lock files with the change

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Review gateway and safeinputs logs for failure analysis Fix safe-inputs MCP server mode mismatch causing tool registration failure Jan 22, 2026
Copilot AI requested a review from pelikhan January 22, 2026 15:17
@pelikhan pelikhan marked this pull request as ready for review January 22, 2026 15:22
@pelikhan pelikhan merged commit 78ca24d into copilot/update-smoke-agentic-workflows Jan 22, 2026
@pelikhan pelikhan deleted the copilot/review-gateway-logs branch January 22, 2026 15:22
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.

2 participants