Skip to content

Reuse one local GitHub backend across MCP reconnections - #86

Merged
LurigeLars merged 1 commit into
mainfrom
fix/shared-stdio-backend-20261014
Oct 14, 2026
Merged

LurigeLars merged 1 commit into
mainfrom
fix/shared-stdio-backend-20261014

Conversation

@LurigeLars

Copy link
Copy Markdown
Owner

Local MCP discovery and reconnections launch short-lived proxy processes. Each process previously created and removed its own Docker backend, causing repeated container creation and teardown even when no GitHub tool was being used.

Reuse one local backend per pinned image and non-secret configuration. Concurrent starters resolve the same container, client exit leaves it running, and a stopped backend is started again without recreation. A separate label keeps legacy PID-based orphan cleanup from removing the shared backend. The DPAPI credential path, per-request authentication, loopback binding, container hardening, tool policy and cloud gateway remain unchanged.

Validation:

  • 35 static security and local forwarding/lifecycle unit tests passed.
  • A real Docker regression passed with four concurrent client processes, subsequent reconnection, client exit, backend stop/restart and MCP tools/list.
  • The pinned upstream write-tool inventory regression and PowerShell syntax checks passed.
  • Local Gateway Security CI now runs the real Docker lifecycle regression.

Previous image/config backends require explicit retirement after their clients have exited. This change prevents Docker churn from short-lived clients; it does not claim to fix or identify Codex's internal refresh trigger.

@LurigeLars
LurigeLars merged commit 0e6c52c into main Oct 14, 2026
9 checks passed
@LurigeLars
LurigeLars deleted the fix/shared-stdio-backend-20261014 branch October 14, 2026 09:33
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.

1 participant