Repository navigation
Conversation
## Short Summary (TL;DR) Claude Code runner sessions and `~/.coder-startup.sh` put Homebrew ahead of the system PATH, so they used Homebrew's `curl`, which doesn't trust the mkcert CA. This change puts Homebrew last, as the image already does, so `curl https://<project>.ddev.site` works there without extra steps. ## The Issue In a Claude Code self-hosted runner session, `curl https://<project>.ddev.site` fails: ```text curl: (60) SSL certificate OpenSSL verify result: unable to get local issuer certificate (20) ``` `mkcert -install` doesn't help, although the workspace startup already runs it. The image puts Homebrew last on PATH, so its formulas never shadow system tools. Two places reverse that order: - `claude-runner-loop.sh.tftpl`, which starts every runner session - The `~/.coder-startup.sh` user hook in all three templates Nobody installs Homebrew's `curl` on purpose. It comes in as a dependency of `zellij`. It uses Homebrew's own CA bundle, which Homebrew copies from the system store once, when the image is built. The mkcert CA only reaches the system store at workspace start, so that copy never has it. The system `curl` reads `/etc/ssl/certs` and trusts the CA. ## How This PR Solves The Issue The four PATH lines now put Homebrew after `$PATH` instead of before it, as the image and `~/.bashrc` already do. The system `curl`, `openssl`, util-linux, `xz`, `zstd`, and ncurses tools then win over Homebrew's copies. Tools that only Homebrew provides, such as `go`, `bats`, `golangci-lint`, and `claude`, still resolve from Homebrew. Removing Homebrew's `curl` was not possible, because `zellij` depends on it. ## Manual Testing Instructions 1. Push the `freeform` template and restart a workspace that has the self-hosted runner enabled. 2. Start a Claude Code session on that runner, and start a DDEV project in it. 3. In the session, run `command -v curl`. Expect `/usr/bin/curl`. 4. Run `curl -sSI https://<project>.ddev.site`. Expect an HTTP status line and no certificate error. 5. Run `command -v go bats claude`. Expect paths under `/home/linuxbrew/.linuxbrew/bin`. For the startup hook, put `command -v curl > /tmp/hook-curl.txt` in `~/.coder-startup.sh`, restart the workspace, and expect `/usr/bin/curl` in that file. ## Automated Testing Overview There are no new tests, because the change is in shell text that the Terraform tests don't run. Claude Code ran both PATH orders in an existing workspace with a running DDEV project. With Homebrew first, `curl` was Homebrew's and failed with the error above. With Homebrew last, `curl` was `/usr/bin/curl` and returned HTTP 200, and `go`, `bats`, `claude`, and `golangci-lint` still came from Homebrew. Terraform was not available locally, so `make validate` and `make test-templates` run only in CI. ## Release/Deployment Notes Push all three templates. Running workspaces get the change at their next restart. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UrTUMyUJqyV4ePwb7PKcWo
Previews
The landing-page preview creates workspaces on staging-coder.ddev.com, and its Documentation links open the docs preview. Read the Docs posts its build status and changed pages in its own comment; the docs preview may take a minute or two after a push to update. Updated for dcd82ca |
zellij came in with #172 without explanation, and nothing in the repository uses it. It was the only formula that depended on Homebrew's curl, openssl@4, and ca-certificates, so new images no longer install them. Existing workspaces keep zellij and its dependencies in their persistent /home/linuxbrew volume. To remove them, run `brew uninstall zellij && brew autoremove`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UrTUMyUJqyV4ePwb7PKcWo
This branch has not been deployed
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.
Short Summary (TL;DR)
Claude Code runner sessions and
~/.coder-startup.shput Homebrew ahead of the system PATH, so they used Homebrew'scurl, which doesn't trust the mkcert CA. This change puts Homebrew last, as the image already does, socurl https://<project>.ddev.siteworks there without extra steps. It also drops the unusedzellijformula, the only reason Homebrew'scurlwas installed.The Issue
In a Claude Code self-hosted runner session,
curl https://<project>.ddev.sitefails:mkcert -installdoesn't help, although the workspace startup already runs it.The image puts Homebrew last on PATH, so its formulas never shadow system tools. Two places reverse that order:
claude-runner-loop.sh.tftpl, which starts every runner session~/.coder-startup.shuser hook in all three templatesNobody installs Homebrew's
curlon purpose. It comes in as a dependency ofzellij. It uses Homebrew's own CA bundle, which Homebrew copies from the system store once, when the image is built. The mkcert CA only reaches the system store at workspace start, so that copy never has it. The systemcurlreads/etc/ssl/certsand trusts the CA.How This PR Solves The Issue
The four PATH lines now put Homebrew after
$PATHinstead of before it, as the image and~/.bashrcalready do. The systemcurl,openssl, util-linux,xz,zstd, and ncurses tools then win over Homebrew's copies. Tools that only Homebrew provides, such asgo,bats,golangci-lint, andclaude, still resolve from Homebrew.The image also stops installing
zellij. It came in with #172 without explanation, and nothing in the repository uses it. It was the only formula that depended on Homebrew'scurl,openssl@4, andca-certificates, so new images no longer install them.Manual Testing Instructions
freeformtemplate and restart a workspace that has the self-hosted runner enabled.command -v curl. Expect/usr/bin/curl.curl -sSI https://<project>.ddev.site. Expect an HTTP status line and no certificate error.command -v go bats claude. Expect paths under/home/linuxbrew/.linuxbrew/bin.For the startup hook, put
command -v curl > /tmp/hook-curl.txtin~/.coder-startup.sh, restart the workspace, and expect/usr/bin/curlin that file.Automated Testing Overview
There are no new tests, because the change is in shell text that the Terraform tests don't run. Claude Code ran both PATH orders in an existing workspace with a running DDEV project. With Homebrew first,
curlwas Homebrew's and failed with the error above. With Homebrew last,curlwas/usr/bin/curland returned HTTP 200, andgo,bats,claude, andgolangci-lintstill came from Homebrew. Terraform was not available locally, somake validateandmake test-templatesrun only in CI.Release/Deployment Notes
Push all three templates. Running workspaces get the PATH change at their next restart.
The
zellijremoval takes effect in the next image build. Existing workspaces keepzellijand Homebrew'scurlin their persistent/home/linuxbrewvolume. To remove them, runbrew uninstall zellij && brew autoremove. The PATH change keeps Homebrew'scurlfrom shadowing the system one in the meantime.https://claude.ai/code/session_01UrTUMyUJqyV4ePwb7PKcWo
Generated by Claude Code