fix(agent-env): support Linux / Podman hosts for create and restart - #114
Merged
Conversation
- Forward the host SSH agent via ${localEnv:SSH_AUTH_SOCK} on Linux,
resolved at each devcontainer up so restarts survive ephemeral agent
socket path changes; keep the fixed Docker Desktop/OrbStack path on
macOS, and omit the mount when no agent is available
- Switch dev-mount CLI install to pnpm add -g (pnpm 11 removed
pnpm link --global)
- Add a pre-flight check surfacing an actionable DEVCONTAINER_CLI_MISSING
error instead of an empty ENOENT when the devcontainer CLI is absent
🦋 Changeset detectedLatest commit: ad3dd59 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Merged
johnzook
added a commit
that referenced
this pull request
Aug 2, 2026
* feat(agent-env): pin managed image tag to agent-env version Image is requested as :<version> instead of :latest so upgrading the npm package reliably picks up the matching container image on next rebuild. Adds image-drift banner in the interactive menu, an actionable IMAGE_VERSION_NOT_PUBLISHED error for the post-release lag window, a dogfood pin sync script wired into the Changesets version step, and a CI check verifying the pin matches the package version. * fix(ci): keep dogfood pin diagnostics reachable under bash -e Failed grep/jq extractions previously aborted the step before the actionable error messages could print. * chore(devcontainer): sync dogfood image pin to 1.1.1 * test(agent-env): add isDevcontainerCliAvailable to container mock Upstream Podman support (#114) added the method to ContainerLifecycle after this branch's mock was written.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes
agent-env createon Linux / Podman hosts (previously macOS + Docker Desktop only):/run/host-services/ssh-auth.sock(a path only Docker Desktop/OrbStack inject on macOS), causingdocker runto fail on Linux. Moved it out of the static image LABEL into a platform-aware resolver (resolveSshAgentMount) that forwards the host agent on Linux as${localEnv:SSH_AUTH_SOCK}— substituted by the devcontainer CLI at eachdevcontainer up, so attach/code restarts survive ephemeral agent socket path changes across logout/reboot — keeps the fixed path on macOS, and omits the mount entirely when no agent is available.pnpm link --global, a form pnpm 11 removed, so it failed withERR_PNPM_LINK_BAD_PARAMSand aborted container creation. Switched the dev-mount install (post-create.sh) and thesetup:agent-envscript topnpm add -g <dir>.devcontainerbinary spawned with ENOENT and surfaced as an empty "No error details available" message. Added a pre-flight check that returns a clearDEVCONTAINER_CLI_MISSINGerror pointing tonpm install -g @devcontainers/clior VS Code's bundled CLI. The CLI remains a soft dependency.init-host.sh's pre-flight SSH agent warning runs asinitializeCommandon everyup, so on Linux it now checks the host's real$SSH_AUTH_SOCKand prints actionablessh-agent/ssh-addguidance exactly when the mount would fail.Test plan
pnpm vitest runinpackages/agent-env— 47 files, 1053 tests passtsc --noEmitcleanresolveSshAgentMount(macOS fixed path, Linux${localEnv:SSH_AUTH_SOCK}variable, null when no agent) andbuildManagedConfigSSH mount injection