Repository navigation
Description
Summary
A workspace started with an extra devcontainer configuration containing an auto-start feature loses that feature's postStartCommand when restarted through devsy workspace ssh. The container and SSH port-forwarding service run, but the application is not started.
Observed with Devsy v1.23.2, Docker Compose, Linux, after a host reboot. Source inspection below is against checkout f0f0d7c01; it is not a claim that this checkout exactly matches the installed binary.
Configuration
Base configuration: .devcontainer/hawk-monorepo/devcontainer.json.
Extra configuration:
{
"features": {
"ghcr.io/davzucky/devcontainers-features-wolfi/codex:1": {},
"ghcr.io/davzucky/devcontainers-features-wolfi/t3code:2.0.1": {
"autoStart": true,
"baseDir": "/home/vscode/.t3/hawk-monorepo",
"host": "0.0.0.0",
"port": "3774"
}
}
}A user service reconnects after boot with:
devsy workspace ssh hawk-monorepo \
--forward-ports 127.0.0.1:3774:127.0.0.1:3774 \
--command "sleep infinity"Observed evidence
- The earlier host-side
workspace_result.jsonincludes the T3 feature and/usr/local/share/t3code-devpod-start.shinMergedConfig.postStartCommand. - The installed startup script still exists and contains the correct auto-start, base-directory, host, and port settings.
- The existing container's
devcontainer.metadatalabel does not include the T3 startup hook. - After restart,
/var/run/devsy/result.jsoninside the container contains neither the T3 feature nor its startup hook. Other feature startup hooks and the base configuration's startup command remain. /var/devsy/postStartCommands.markermatches the current containerStartedAttimestamp. Lifecycle processing occurred, but with T3 absent from the effective command list.- Nothing listens on container port 3774. Direct
curl http://127.0.0.1:3774inside the container fails with connection refused; the host-side forwarded connection resets.
This is an observed existing-workspace failure; a clean-room minimal reproduction has not yet been performed. The original creation invocation was not recovered.
Suspected code path
cmd/internal/container_tunnel.go,startContainer, invokesrunner.UpwithUpOptions{NoBuild: true}and no extra configuration path.pkg/devcontainer/config.go,getSubstitutedConfigWithContext, loads the overlay fromoptions.ExtraDevContainerPath. An empty invocation option does not load the original overlay.pkg/devcontainer/compose.go,finalizeComposeContainer, reconstructs configuration from container metadata and the supplied extra configuration. For this container, neither source restores the T3 hook.
This explains the restart-time configuration loss. Why the original container metadata omitted the overlay feature hook remains unconfirmed and should be investigated before selecting a fix. Persisting an overlay path may not be the intended design; preserving the effective feature metadata could be the appropriate solution.
Expected behavior
Starting an existing workspace through SSH should preserve the effective feature lifecycle commands from its creation and execute the applicable postStartCommand hooks for the new container start.
The Dev Container specification defines postStartCommand as:
A command to run each time the container is successfully started.
Earlier lifecycle failures can prevent subsequent hooks; this report concerns a hook missing from reconstructed configuration, not an expectation that Docker itself executes devcontainer hooks.
Suggested regression coverage
Create a Compose workspace with an overlay-only feature declaring postStartCommand, then restart it through the SSH/container-tunnel path without repeating creation flags. Assert that the effective command list retains the feature hook and that the hook runs for the new start, without requiring a rebuild.
Activity
skevetter commentedon Oct 19, 2026
fix included with latest release
davzucky commentedon Oct 19, 2026
thank you very much,