Gemini CLI PR bridges IDE companion into container sandboxes without exposing tokens

elberthc-byte · ghdev · 2026-10-21

PR #29858 in google-gemini/gemini-cli fixes IDE integration (open-file context, native diffs) for Gemini CLI running in docker/podman/gVisor sandboxes. Instead of forwarding the companion's bearer token — which would be a sandbox escape since openDiff accepts arbitrary host paths — the host launcher brokers the MCP session into the container over docker exec -i and a Unix socket, with the CLI using its existing stdio transport. The channel doesn't depend on container networking at all, which is why it works even under gVisor's private loopback. A reusable engineering pattern for sandboxed agent/IDE integrations.

Original post →

More from coding & agent

coding & agent channel →