docs: make ${env.X} the canonical variable-expansion syntax (+ fixes)#3325
Merged
Conversation
gtardif
previously approved these changes
Jun 30, 2026
…nsion
os.ExpandEnv doesn't understand the ${env.VAR} alias form, so it would
silently expand to an empty string. Normalize via pathx.NormalizeEnvRefs
first, matching the behavior of pkg/path.ExpandPath and pkg/environment.Expand.
Assisted-By: Claude
Between a failed rename and the recovery Stat, a third concurrent build can retire finalDir, leaving it momentarily gone. Wrap publishing in a bounded retry loop so the transient gap is claimed rather than errored. Assisted-By: Claude
1e869e3 to
a170b97
Compare
Sayt-0
approved these changes
Jun 30, 2026
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.
Several fields in the agent config (command arguments, HTTP headers, filesystem paths) expand variables at runtime, but the docs and examples were inconsistent about which syntax actually works. In JavaScript-expanded fields only
${env.X}is resolved; shell-style$VARand${VAR}are silently ignored at runtime. This made many examples misleading and caused real user confusion.This change makes
${env.X}the single canonical form across all documentation and example YAML files. Occurrences of$VAR/${VAR}in fields where only${env.X}is resolved have been corrected, and the central "Variable Expansion in Config Fields" reference indocs/configuration/overview/index.mdnow clearly documents this. Per-tool docs for mcp, a2a, filesystem, shell, and the Anthropic provider have been updated to match.Two accompanying fixes close related gaps. First, the filesystem
allow_list/deny_listpath tokens now correctly resolve${env.VAR}(the path-expansion helper now normalises that form before callingos.ExpandEnv, matching howpkg/path.ExpandPathandpkg/environment.Expandwork), with new test coverage added. Second, a concurrency bug in the sandbox kitpromote()function is fixed: when two builds for the same agent raced, one could fail because the destination directory was transiently moved aside by the other; the publish step now retries in that case.