Update mise docs: prefer shell-level shims over conductor-exec#2537
Update mise docs: prefer shell-level shims over conductor-exec#2537
Conversation
Document that activating mise shims in .zshenv/.bashrc/.profile (plus exporting BASH_ENV/ENV) makes bin/conductor-exec unnecessary. Demote conductor-exec to a fallback for users without shell-level shims setup. Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughDocumentation update to Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Show actual .zshenv, .bashrc, and .profile snippets instead of linking to a private repository. Co-Authored-By: Claude Opus 4.6 <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0554d9bc1e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Greptile SummaryThis PR is a documentation-only update to Key changes:
Two issues identified:
Confidence Score: 4/5
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Shell spawned by Conductor / coding agent] --> B{Shell-level mise\nshims configured?}
B -- Yes --> C[.zshenv sources\nmise activate zsh --shims]
B -- No --> F[Use bin/conductor-exec wrapper]
C --> D[BASH_ENV / ENV exported\nfor child bash/sh processes]
D --> E{System binary\nshadowing shims?}
E -- No --> G[✅ Correct tool version used]
E -- Yes --> F
F --> H[mise exec --\nsets up correct tool PATH]
H --> G
Last reviewed commit: 8c3f5b6 |
- Restore symptoms section for self-diagnosis - Correct ENV claim: note that dash/sh ignores ENV for non-interactive shells - Fix misleading "bypasses PATH" phrasing for mise exec Co-Authored-By: Claude Opus 4.6 <[email protected]>
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.claude/docs/conductor-compatibility.md (1)
53-53: Align Ruby command example with repo convention.For consistency with project guidance, consider
bin/conductor-exec bundle exec ruby --versionin this example.Based on learnings: Use
bundle execfor all Ruby commands.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.claude/docs/conductor-compatibility.md at line 53, The example command in the docs currently shows "bin/conductor-exec ruby --version" which doesn't follow the repo's Ruby convention; update the example to use bundler by changing it to "bin/conductor-exec bundle exec ruby --version" so all Ruby invocations in conductor-compatibility.md follow the project's "bundle exec" guidance.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.claude/docs/conductor-compatibility.md:
- Around line 44-46: Revise the paragraph around "bin/conductor-exec" and the
claim that "all shells automatically get mise-managed tool versions" to soften
the guarantee and document shim limitations: explicitly state that "mise
activate --shims" provides shims that work reliably in non-interactive contexts
but do not run shell hooks, do not load mise.toml env vars into the whole shell
(they're only applied when a shim runs), and make which <tool> point to the shim
instead of the real binary; recommend using "mise exec --" or falling back to
"bin/conductor-exec" when you need full environment/hook behavior or to avoid
shim shadowing, and keep the existing caveat about removing conflicting system
binaries or using the fallback.
---
Nitpick comments:
In @.claude/docs/conductor-compatibility.md:
- Line 53: The example command in the docs currently shows "bin/conductor-exec
ruby --version" which doesn't follow the repo's Ruby convention; update the
example to use bundler by changing it to "bin/conductor-exec bundle exec ruby
--version" so all Ruby invocations in conductor-compatibility.md follow the
project's "bundle exec" guidance.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 1379bf1d-83f2-4ced-b5eb-676ab111b8ce
📒 Files selected for processing (1)
.claude/docs/conductor-compatibility.md
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 06c939e720
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
ReviewGood improvement overall. Promoting shell-level shim activation to the preferred approach is the right direction — it makes the setup self-healing for Conductor, coding agents, and any other non-interactive shell consumers. The three-commit progression (restructure → add examples → fix review issues) shows good iterative refinement. Key concerns1. This is the most significant issue. 2.
3. Bullet/code inconsistency (see inline comment on line 21) Bullet 4 mentions only Minor notes
Overall the docs are a clear improvement; addressing the |
|
Overall this is a useful improvement. The .zshenv example with hardcoded path checks is the right approach for bootstrapping. A few things worth addressing:
Step 3 recommends
The snippet uses
Minor: "bypasses PATH entirely" is inaccurate The fallback section says |
|
Overall direction is sound and a genuine improvement. Three inline comments call out the specific issues — the most important being the BASH_ENV + interactive guard pitfall, which can silently break the preferred solution for the majority of users whose .bashrc has an early-return guard for non-interactive shells. |
mise doesn't support `sh` as a shell type. The `--shims` flag output is just `export PATH=...` which is valid POSIX and works under dash/sh. Co-Authored-By: Claude Opus 4.6 <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7df657cb3f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
🧹 Nitpick comments (3)
.claude/docs/conductor-compatibility.md (3)
40-43: Clarify the utility of the ENV export given the caveat.Lines 40-41 note that "dash ignores ENV for non-interactive shells" and suggest using
conductor-execas a fallback for#!/bin/shscripts. Given this limitation, exportingENV="$HOME/.profile"on line 43 may create false expectations that it will work universally for POSIX sh shells.Consider either:
- Removing the
ENVexport entirely and relying on the documented fallback for sh scripts, or- Expanding the comment to clarify which specific shells honor ENV in non-interactive mode (e.g., "ksh, zsh may honor ENV; dash, busybox sh typically do not")
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.claude/docs/conductor-compatibility.md around lines 40 - 43, The ENV export line ("export ENV=\"$HOME/.profile\"") can be misleading given dash and some other sh variants ignore ENV in non-interactive shells; either remove that export and rely on the documented conductor-exec fallback for #!/bin/sh scripts, or expand the surrounding comment to explicitly state which shells honor ENV in non-interactive mode (e.g., ksh, zsh may honor ENV; dash and busybox sh typically do not) and keep the export only as an example for shells that do; reference the ENV line and the conductor-exec fallback in your change so readers see the connection.
56-56: Soften the advice to remove system binaries.The suggestion to "remove the conflicting binary" could be risky—users might inadvertently remove important system-provided tools that other software depends on. Consider rephrasing to emphasize safer alternatives first.
📝 Suggested rewording
-**Caveat:** Ensure no system binaries shadow mise shims on PATH (e.g., `/usr/local/bin/node`). If they do, either remove the conflicting binary or use `conductor-exec` as a fallback. +**Caveat:** Ensure no system binaries shadow mise shims on PATH (e.g., `/usr/local/bin/node`). If they do, prefer using `conductor-exec` as a fallback, or carefully remove the conflicting binary only if you're certain it's not needed by other system software.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.claude/docs/conductor-compatibility.md at line 56, The current sentence tells users to "remove the conflicting binary" which is risky; update the line referencing PATH, mise shims and conductor-exec to soften the advice: recommend safer alternatives first (e.g., adjust PATH so mise shims precede system binaries, rename or move the conflicting binary locally, or use the documented fallback conductor-exec) and only mention removal as a last-resort option with a clear warning. Ensure the new phrasing includes the terms "mise shims", "PATH", and "conductor-exec" so readers can find the fallback and common fixes.
14-67: Consider adding the example dotfiles repository reference.The PR objectives mention adding a reference to an example dotfiles repository (justin808-dotfiles), but this reference doesn't appear in the documentation. Including a link to a working example would help users validate their setup against a known-good configuration.
💡 Suggested addition
Add after line 56 or in the Reference section:
**Example:** See [justin808's dotfiles](https://github.com/justin808/justin808-dotfiles) for a complete working configuration.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.claude/docs/conductor-compatibility.md around lines 14 - 67, The docs mention an example dotfiles repo but don't include a link; add a reference to justin808's example dotfiles by inserting a short note like "**Example:** See [justin808's dotfiles](https://github.com/justin808/justin808-dotfiles) for a complete working configuration." into the conductor-compatibility.md near the end of the "Preferred Solution: Shell-Level mise Shims" section (or in the References section) so readers can validate their setup against a known-good configuration; locate the spot by searching for the headings "Preferred Solution: Shell-Level mise Shims" or "Fallback: `bin/conductor-exec` Wrapper" and add the single-line example link immediately after that discussion.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.claude/docs/conductor-compatibility.md:
- Around line 40-43: The ENV export line ("export ENV=\"$HOME/.profile\"") can
be misleading given dash and some other sh variants ignore ENV in
non-interactive shells; either remove that export and rely on the documented
conductor-exec fallback for #!/bin/sh scripts, or expand the surrounding comment
to explicitly state which shells honor ENV in non-interactive mode (e.g., ksh,
zsh may honor ENV; dash and busybox sh typically do not) and keep the export
only as an example for shells that do; reference the ENV line and the
conductor-exec fallback in your change so readers see the connection.
- Line 56: The current sentence tells users to "remove the conflicting binary"
which is risky; update the line referencing PATH, mise shims and conductor-exec
to soften the advice: recommend safer alternatives first (e.g., adjust PATH so
mise shims precede system binaries, rename or move the conflicting binary
locally, or use the documented fallback conductor-exec) and only mention removal
as a last-resort option with a clear warning. Ensure the new phrasing includes
the terms "mise shims", "PATH", and "conductor-exec" so readers can find the
fallback and common fixes.
- Around line 14-67: The docs mention an example dotfiles repo but don't include
a link; add a reference to justin808's example dotfiles by inserting a short
note like "**Example:** See [justin808's
dotfiles](https://github.com/justin808/justin808-dotfiles) for a complete
working configuration." into the conductor-compatibility.md near the end of the
"Preferred Solution: Shell-Level mise Shims" section (or in the References
section) so readers can validate their setup against a known-good configuration;
locate the spot by searching for the headings "Preferred Solution: Shell-Level
mise Shims" or "Fallback: `bin/conductor-exec` Wrapper" and add the single-line
example link immediately after that discussion.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 5eb2e55b-bc2d-4f98-a8da-8b5521f54604
📒 Files selected for processing (1)
.claude/docs/conductor-compatibility.md
|
Overall this is a useful doc improvement. Promoting shell-level shim activation over the wrapper script is the right direction. One functional concern and two minor points (detailed in inline comments): Functional: BASH_ENV -> .bashrc silent failure. Most .bashrc files have a non-interactive guard (e.g. '[ -z $PS1 ] && return') near the top. When bash is launched non-interactively with BASH_ENV set, it sources .bashrc but immediately returns on that guard before reaching the mise activation line. No error is produced, so shims silently fail to load. Fix: either warn users to place the mise activate line before any such guard, or recommend pointing BASH_ENV at a dedicated file (e.g. ~/.mise_shims.sh) with just the activation line and no guards -- cleaner and avoids the pitfall. Minor 1: The .zshenv code block uses 'bash' as the syntax hint; 'zsh' is more accurate. Minor 2: The PR description mentions adding a reference to justin808-dotfiles, but it is not in the diff. Intentional omission, or should it be in the Reference section? |
Review: Documentation-only, well-structured updateThis is a solid improvement — the shell-level shims approach genuinely reduces friction for developers who haven't set up Path ordering is macOS-centricThe hardcoded BASH_ENV performance impact deserves explicit mentionThe current caveat only says "heavy .bashrc setup slows every non-interactive bash invocation." But
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.claude/docs/conductor-compatibility.md:
- Line 95: Update the doc text so it accurately reflects the wrapper’s
conditional behavior: instead of stating that `bin/conductor-exec` “calls `mise
exec --`”, change the wording to say it attempts to run `mise exec --` when
`mise` is on PATH and otherwise falls back to executing the command directly;
reference the actual implementation in `bin/conductor-exec` (lines 1–24) for the
conditional `mise` fallback and ensure the wording makes clear that mise
activation is not guaranteed in every environment.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c168fdeb-e179-4d19-80a2-282f03390058
📒 Files selected for processing (1)
.claude/docs/conductor-compatibility.md
There was a problem hiding this comment.
🧹 Nitpick comments (4)
.claude/docs/conductor-compatibility.md (4)
106-108: Consider adding dotfiles reference.The PR summary mentions adding "a reference to an example dotfiles repository (justin808-dotfiles)" but this reference is not present in the documentation. Adding a link to working dotfiles examples would help users see the complete configuration in context.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.claude/docs/conductor-compatibility.md around lines 106 - 108, The Reference section is missing the promised dotfiles example; add a link to the justin808-dotfiles repository under the "## Reference" heading so readers can view a working dotfiles configuration. Locate the "## Reference" block in conductor-compatibility.md and append a bullet or sentence referencing "justin808-dotfiles" (include the repository URL and brief label), ensuring the text matches the PR summary that mentions the dotfiles example.
40-48: Consider ENV export clarity.Lines 45-47 export
ENV="$HOME/.profile", but the.profileexample (lines 68-82) contains bash-specific code guarded byBASH_VERSION. While this is technically safe (dash/sh will skip the guard), it may confuse readers since:
ENVprimarily affects interactive POSIX shells (dash, sh)- The
.profilemise activation only runs whenBASH_VERSIONis set- Interactive
dashshells that source$ENVwould skip the entire mise blockConsider adding a comment explaining that the
.profilemise block won't execute in dash, soENVmainly serves to load other POSIX-compatible profile configuration, or consider creating a separate POSIX-safe startup file forENV.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.claude/docs/conductor-compatibility.md around lines 40 - 48, Update the ENV explanation to clarify that exporting ENV="$HOME/.profile" does not cause the mise (BASH-specific) block in .profile to run under dash/sh because that block is guarded by BASH_VERSION; explicitly note that ENV mainly loads POSIX-compatible profile bits for interactive dash/sh and recommend either moving non-POSIX/Bash-specific mise code out of .profile or creating a separate POSIX-safe startup file (e.g., .profile_posix) referenced by ENV. Reference the ENV export and the .profile mise block guarded by BASH_VERSION so readers know which symbols to change.
91-92: Expand PATH ordering guidance for Linux systems.The caveat mentions PATH reordering but doesn't explain how to ensure mise shims win. On Linux, system package managers install to
/usr/binor/usr/local/bin, which often precede~/.local/share/mise/shimsin default PATH. Users may not realize they need to verify shim directory placement.Consider adding explicit guidance: check that the mise shims directory appears before system binary paths in
echo $PATH, and if not, adjust the order in startup files before themise activate --shimscall or verify thatmise activate --shimscorrectly prepends the shim directory.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.claude/docs/conductor-compatibility.md around lines 91 - 92, Expand the caveat to show exactly how to verify and fix PATH ordering on Linux: instruct users to run echo $PATH to confirm that ~/.local/share/mise/shims appears before /usr/bin and /usr/local/bin, and if it does not, update their shell startup file (e.g., ~/.bashrc, ~/.profile, or the file where mise is initialized) so the mise shims directory is prepended to PATH before calling mise activate --shims; alternatively note that users can confirm mise activate --shims actually prepends the shim directory and, if it doesn't, show how to manually export a PATH with the shim directory first or use conductor-exec as a fallback.
89-90: Shim limitations documented but could be more prominent.This addresses the previous review comment (fingerprint: phantom:triton:hawk) about documenting shim limitations. The current text mentions key limitations (hooks don't run, env vars applied at execution,
whichpoints to shim) but buries them in a long sentence at line 89-90.Consider making these limitations more prominent with a dedicated subsection or bullet list, since they represent significant behavioral differences from full
mise activatethat could surprise users.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.claude/docs/conductor-compatibility.md around lines 89 - 90, The current long sentence describing "mise activate --shims" limitations should be made more prominent: replace or follow that sentence with a short subsection or bolded subheading like "Shim limitations" and list the key differences as bullets calling out that shell hooks do not run, mise.toml env vars are applied only at shim execution, and which <tool> points to the shim (use the exact phrases "mise activate --shims", "mise.toml", and "which <tool>" from the diff). Also add the recommended alternatives (mention "bin/conductor-exec" and "mise exec --") as a callout line so users immediately see when to use the full mise-managed environment or to avoid shim shadowing while debugging.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.claude/docs/conductor-compatibility.md:
- Around line 106-108: The Reference section is missing the promised dotfiles
example; add a link to the justin808-dotfiles repository under the "##
Reference" heading so readers can view a working dotfiles configuration. Locate
the "## Reference" block in conductor-compatibility.md and append a bullet or
sentence referencing "justin808-dotfiles" (include the repository URL and brief
label), ensuring the text matches the PR summary that mentions the dotfiles
example.
- Around line 40-48: Update the ENV explanation to clarify that exporting
ENV="$HOME/.profile" does not cause the mise (BASH-specific) block in .profile
to run under dash/sh because that block is guarded by BASH_VERSION; explicitly
note that ENV mainly loads POSIX-compatible profile bits for interactive dash/sh
and recommend either moving non-POSIX/Bash-specific mise code out of .profile or
creating a separate POSIX-safe startup file (e.g., .profile_posix) referenced by
ENV. Reference the ENV export and the .profile mise block guarded by
BASH_VERSION so readers know which symbols to change.
- Around line 91-92: Expand the caveat to show exactly how to verify and fix
PATH ordering on Linux: instruct users to run echo $PATH to confirm that
~/.local/share/mise/shims appears before /usr/bin and /usr/local/bin, and if it
does not, update their shell startup file (e.g., ~/.bashrc, ~/.profile, or the
file where mise is initialized) so the mise shims directory is prepended to PATH
before calling mise activate --shims; alternatively note that users can confirm
mise activate --shims actually prepends the shim directory and, if it doesn't,
show how to manually export a PATH with the shim directory first or use
conductor-exec as a fallback.
- Around line 89-90: The current long sentence describing "mise activate
--shims" limitations should be made more prominent: replace or follow that
sentence with a short subsection or bolded subheading like "Shim limitations"
and list the key differences as bullets calling out that shell hooks do not run,
mise.toml env vars are applied only at shim execution, and which <tool> points
to the shim (use the exact phrases "mise activate --shims", "mise.toml", and
"which <tool>" from the diff). Also add the recommended alternatives (mention
"bin/conductor-exec" and "mise exec --") as a callout line so users immediately
see when to use the full mise-managed environment or to avoid shim shadowing
while debugging.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c0983ffb-1cb3-480f-be6a-c658a08de162
📒 Files selected for processing (1)
.claude/docs/conductor-compatibility.md
|
|
||
| # ENV is only sourced by interactive POSIX sh/dash shells. | ||
| # It does not help with non-interactive sh -c or #!/bin/sh scripts. | ||
| export ENV="$HOME/.profile" |
There was a problem hiding this comment.
The BASH_ENV and ENV exports are only shown inside the .zshenv example, so bash-primary users (who have bash, not zsh, as their login shell) won't get them set. Consider adding a brief note — or a matching .bash_profile snippet — explaining that these exports also belong in ~/.bash_profile (or ~/.profile) for pure-bash setups.
Also, pointing ENV at ~/.profile can cause double-sourcing during bash/sh login sessions (.profile is already sourced at login; ENV would re-run it in any subsequent interactive sh sub-shell). A small dedicated file — e.g. ~/.shenv, parallel to ~/.bash_env — would be cleaner and avoids any idempotency concerns:
| export ENV="$HOME/.profile" | |
| export BASH_ENV="$HOME/.bash_env" | |
| # ENV is only sourced by interactive POSIX sh/dash shells. | |
| # It does not help with non-interactive sh -c or #!/bin/sh scripts. | |
| # Use a minimal dedicated file to avoid double-sourcing .profile in sub-shells. | |
| export ENV="$HOME/.shenv" |
Review: Documentation-only, well-researched updateOverall this is a solid improvement — the new shell-level shims approach is accurate, the per-shell examples are correct, and the trade-off/caveat sections are honest and useful. A couple of small issues worth addressing:
|
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Review: Documentation update for mise shim activationThis is a solid improvement with the right structure (preferred solution first, fallback second). A few observations: Missing dotfiles reference: The PR description mentions adding a reference to justin808-dotfiles, but no such reference appears in the actual diff. The PR description should be updated if this was left out intentionally. Fish shell users not covered: The doc covers zsh, bash, and sh/dash but not fish. Fish uses ~/.config/fish/config.fish and 'mise activate fish'. Worth at least a brief note pointing fish users elsewhere. export ENV uses .profile unconventionally: ENV conventionally points to a lightweight dedicated file (e.g., ~/.shrc) rather than .profile. Using .profile as ENV causes it to be sourced on every interactive sh/dash session, not just login shells, potentially triggering login-specific side effects repeatedly. Since the doc acknowledges ENV does not help with non-interactive sh invocations (the actual Conductor use case), the value of this export is very narrow. Consider removing it or using a dedicated ~/.shrc instead. Ambiguous note on line 84: The line 'Do not use full mise activate bash in .profile' is confusing because the example already uses 'mise activate bash --shims'. The distinction between full activation and shim-only activation is not spelled out. Clarifying why (full activation emits bash-specific shell hook code that breaks POSIX sh) would help readers. |
| # ENV is only sourced by interactive POSIX sh/dash shells. | ||
| # It does not help with non-interactive sh -c or #!/bin/sh scripts. | ||
| export ENV="$HOME/.profile" |
There was a problem hiding this comment.
The comment is accurate but the choice of value is unconventional. ENV typically points to a minimal, dedicated file like ~/.shrc, not .profile. Using .profile as ENV means it will be sourced for every interactive sh/dash session — not just login shells — which could cause login-specific code in .profile (PATH modifications, launch agents, etc.) to run repeatedly.
Since this only benefits interactive sh sessions (as the comment notes, it does nothing for sh -c or #!/bin/sh), and Conductor's use cases are non-interactive, you might consider dropping this export entirely or using a dedicated ~/.shrc:
| # ENV is only sourced by interactive POSIX sh/dash shells. | |
| # It does not help with non-interactive sh -c or #!/bin/sh scripts. | |
| export ENV="$HOME/.profile" | |
| # ENV is only sourced by interactive POSIX sh/dash shells. | |
| # It does not help with non-interactive sh -c or #!/bin/sh scripts. | |
| # If you want mise shims in interactive sh/dash, point ENV at a dedicated ~/.shrc | |
| # rather than ~/.profile to avoid sourcing login-shell code on every sh invocation. | |
| export ENV="$HOME/.shrc" |
| fi | ||
| ``` | ||
|
|
||
| Do not use full `mise activate bash` in `.profile`; that output is bash-specific. |
There was a problem hiding this comment.
This note is confusing because the example code on lines 72–80 already uses mise activate bash --shims — the "safe" form. The reader may wonder what "full mise activate bash" means and why it's being warned against when the example doesn't use it.
Consider rephrasing to make the distinction explicit:
| Do not use full `mise activate bash` in `.profile`; that output is bash-specific. | |
| Do not use `mise activate bash` (without `--shims`) directly in `.profile` — that command emits bash-specific shell hook code (functions, prompt hooks) that will cause syntax errors in `dash` or strict POSIX `sh`. The `--shims` flag used above is safe because it only prepends the shim directory to PATH. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.claude/docs/conductor-compatibility.md:
- Around line 21-22: The doc currently tells users to export BASH_ENV from
.zshenv which won't work for bash login shells; update the guidance to instruct
exporting BASH_ENV from a startup file the user's login shell actually reads—for
bash recommend adding export BASH_ENV=~/.bash_env to .bash_profile or .profile,
for zsh keep the .zshenv instruction, and retain the note about ENV only
affecting interactive sh/dash and that non-interactive sh/bash still need
conductor-exec; reference the symbols BASH_ENV, ENV, .zshenv, .bash_profile,
.profile, and conductor-exec so readers know where to apply changes.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: f284b2a2-4a13-40ff-a1ef-25e2a71aaf80
📒 Files selected for processing (1)
.claude/docs/conductor-compatibility.md
| 4. **Export `BASH_ENV` and `ENV`** from `.zshenv` — `BASH_ENV` makes non-interactive `bash -c` source `~/.bash_env`; `ENV` only affects interactive `sh`/`dash` (non-interactive `sh -c` and `#!/bin/sh` still need `conductor-exec`) | ||
|
|
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
bash BASH_ENV non-interactive shell behavior environment variable
💡 Result:
In bash, BASH_ENV controls what gets sourced when Bash starts non-interactively (e.g., bash -c '…' or running a script via #!/usr/bin/bash).
- Non-interactive startup behavior: If
BASH_ENVis set in the environment, Bash expands its value and then reads and executes that file before running the command/script body. (tiswww.case.edu) - What it’s for: It’s the non-interactive analogue of
~/.bashrc(which is for interactive shells). This is how you inject common functions/vars/options into non-interactive Bash runs. (tiswww.case.edu) - Not the same as
ENV: When Bash is invoked assh(or in POSIX-leaningsh-compat scenarios), the corresponding variable isENV, notBASH_ENV. (manpagez.com)
Typical usage:
export BASH_ENV="$HOME/.bashenv"
bash -c 'echo "$MYVAR"'(Where ~/.bashenv contains things you want available to non-interactive Bash, e.g. export MYVAR=....) (tiswww.case.edu)
Citations:
- 1: https://tiswww.case.edu/php/chet/bash/bash.html?utm_source=openai
- 2: https://tiswww.case.edu/php/chet/bash/bash.html?utm_source=openai
- 3: https://www.manpagez.com/info/bashref/bashref-4.2/bashref_71.php?utm_source=openai
- 4: https://tiswww.case.edu/php/chet/bash/bash.html?utm_source=openai
🌐 Web query:
bash login shell vs interactive shell .bash_profile .profile startup files
💡 Result:
Login shell vs interactive shell (Bash)
Interactive shell: you’re typing commands at a prompt (stdin+stderr are terminals, or bash -i). Login shell: a shell started “as login” (argv[0] begins with -, or bash -l/--login). (gnu.org)
These are independent flags, so you can have:
- interactive + login (common for console/SSH login; some terminal configs)
- interactive + non-login (common when opening a terminal on many Linux desktops)
- non-interactive (scripts,
bash -c ...)
Which startup files run?
1) Interactive login shell
Runs, in order: (gnu.org)
/etc/profile- first readable of:
~/.bash_profile,~/.bash_login,~/.profile - (on exit)
~/.bash_logout
Common practice: make your ~/.bash_profile source ~/.bashrc so you get the same interactive settings in login shells: (gnu.org)
# in ~/.bash_profile
[ -f ~/.bashrc ] && . ~/.bashrc2) Interactive non-login shell
Runs: (gnu.org)
~/.bashrc
3) Non-interactive shell (scripts, bash -c, etc.)
Does not read ~/.bashrc/~/.bash_profile by default; instead it will read the file pointed to by BASH_ENV (if set): (gnu.org)
$BASH_ENV(expanded, then sourced)
4) If Bash is invoked as sh
It follows a more POSIX-like path (notably using ~/.profile and/or ENV), and won’t read ~/.bashrc the normal way. (gnu.org)
Practical rule of thumb (what goes where)
- Put environment variables you want everywhere (PATH, LANG, editor, tool env) in a login file (
~/.bash_profileor~/.profile), so they exist for the whole session. (gnu.org) - Put interactive-only things (prompt
PS1, aliases, completion,set -o vi, etc.) in~/.bashrc. (gnu.org)
Handy options
bash --noprofile: skip/etc/profileand~/.bash_profile/~/.profile(login startup) (gnu.org)bash --norc: skip~/.bashrc(interactive startup) (gnu.org)bash --rcfile FILE: use an alternate rc file instead of~/.bashrc(gnu.org)
Citations:
- 1: https://www.gnu.org/s/bash/manual/html_node/Invoking-Bash.html
- 2: https://www.gnu.org/software/bash/manual/html_node/Bash-Startup-Files
- 3: https://www.gnu.org/software/bash/manual/html_node/Bash-Startup-Files
- 4: https://www.gnu.org/software/bash/manual/html_node/Bash-Startup-Files
- 5: https://www.gnu.org/software/bash/manual/html_node/Bash-Startup-Files
- 6: https://www.gnu.org/software/bash/manual/html_node/Bash-Startup-Files
- 7: https://www.gnu.org/software/bash/manual/html_node/Bash-Startup-Files
- 8: https://www.gnu.org/software/bash/manual/html_node/Bash-Startup-Files
- 9: https://www.gnu.org/s/bash/manual/html_node/Invoking-Bash.html
- 10: https://www.gnu.org/s/bash/manual/html_node/Invoking-Bash.html
- 11: https://www.gnu.org/software/bash/manual/html_node/Bash-Startup-Files
🌐 Web query:
zsh .zshenv when sourced bash users
💡 Result:
~/.zshenvis read by zsh on every zsh startup (interactive/non-interactive, login/non-login), as long as zsh is allowed to read rc files (i.e.,RCSis set). Zsh always reads the global/etc/zshenvfirst. [1][2]- If zsh is started with
-f(orRCSis unset), zsh skips user startup files like~/.zshenv(but/etc/zshenvis still first and effectively unavoidable). [1][2] - Bash users do not source
~/.zshenvat all unless they actually run zsh (e.g., they startzsh, their login shell is set to zsh, or a script uses a#!/.../zshshebang /zsh -c ...). Bash has its own startup files (~/.bashrc,~/.bash_profile, etc.). [3]
Sources:
[1] zsh(1) “STARTUP/SHUTDOWN FILES” (manpages.opensuse.org) (manpages.opensuse.org)
[2] Zsh RCS option description (zsh.sourceforge.io) (zsh.sourceforge.io)
[3] Notes on zsh startup files and that zshenv files are “always used” when present (scriptingosx.com) (scriptingosx.com)
Citations:
- 1: https://manpages.opensuse.org/Tumbleweed/zsh/zsh.1.en.html?utm_source=openai
- 2: https://zsh.sourceforge.io/Doc/Release/Options.html?utm_source=openai
- 3: https://scriptingosx.com/2019/06/moving-to-zsh-part-2-configuration-files/?utm_source=openai
Export BASH_ENV from a startup file your login shell actually reads.
The current guidance exports BASH_ENV only from .zshenv, which doesn't work for bash users—bash login shells never read .zshenv, so BASH_ENV is never exported and non-interactive bash -c still won't load ~/.bash_env. Use .bash_profile or .profile for bash users, and keep .zshenv for zsh users.
Suggested doc update
-4. **Export `BASH_ENV` and `ENV`** from `.zshenv` — `BASH_ENV` makes non-interactive `bash -c` source `~/.bash_env`; `ENV` only affects interactive `sh`/`dash` (non-interactive `sh -c` and `#!/bin/sh` still need `conductor-exec`)
+4. **Export `BASH_ENV` and `ENV`** from a startup file your login shell reads — use `.zshenv` for zsh, or `.bash_profile`/`.profile` for bash. `BASH_ENV` makes non-interactive `bash -c` source `~/.bash_env`; `ENV` only affects interactive `sh`/`dash` (non-interactive `sh -c` and `#!/bin/sh` still need `conductor-exec`)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| 4. **Export `BASH_ENV` and `ENV`** from `.zshenv` — `BASH_ENV` makes non-interactive `bash -c` source `~/.bash_env`; `ENV` only affects interactive `sh`/`dash` (non-interactive `sh -c` and `#!/bin/sh` still need `conductor-exec`) | |
| 4. **Export `BASH_ENV` and `ENV`** from a startup file your login shell reads — use `.zshenv` for zsh, or `.bash_profile`/`.profile` for bash. `BASH_ENV` makes non-interactive `bash -c` source `~/.bash_env`; `ENV` only affects interactive `sh`/`dash` (non-interactive `sh -c` and `#!/bin/sh` still need `conductor-exec`) |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.claude/docs/conductor-compatibility.md around lines 21 - 22, The doc
currently tells users to export BASH_ENV from .zshenv which won't work for bash
login shells; update the guidance to instruct exporting BASH_ENV from a startup
file the user's login shell actually reads—for bash recommend adding export
BASH_ENV=~/.bash_env to .bash_profile or .profile, for zsh keep the .zshenv
instruction, and retain the note about ENV only affecting interactive sh/dash
and that non-interactive sh/bash still need conductor-exec; reference the
symbols BASH_ENV, ENV, .zshenv, .bash_profile, .profile, and conductor-exec so
readers know where to apply changes.
## Summary - Updated conductor-compatibility docs to reflect that shell-level mise shim activation (`.zshenv`/`.bashrc`/`.profile` + `BASH_ENV`/`ENV` exports) is the preferred approach - Demoted `bin/conductor-exec` wrapper to a fallback for users who haven't configured shell-level shims - Added reference to [justin808-dotfiles](https://github.com/justin808/justin808-dotfiles) for implementation example - Added caveat about system binaries that can shadow mise shims on PATH ## Context With mise shims activated in `.zshenv` (which runs for all zsh shells, including non-interactive ones used by Conductor and coding agents), the `conductor-exec` wrapper becomes unnecessary. The `BASH_ENV`/`ENV` exports ensure child bash/sh processes also get shims. ## Test plan - [ ] Verify docs render correctly in CLAUDE.md (auto-included via `@` reference) - [ ] Confirm conductor-exec still works as fallback 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Documentation-only changes that adjust recommended setup and add guidance; no runtime or build logic is modified. > > **Overview** > Updates `conductor-compatibility.md` to recommend enabling mise shims at the shell level (`.zshenv`/`.bashrc`/`.profile` plus `BASH_ENV`/`ENV`) as the primary fix for non-interactive Conductor/agent shells using system tool versions. > > Demotes `bin/conductor-exec` to a documented fallback, adds a dotfiles reference implementation, and notes a PATH-shadowing caveat when system binaries override mise shims. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 0554d9b. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Recommend shell-level shim activation as the preferred setup for both interactive and non-interactive shells, with step-by-step per-shell guidance. * Clarified environment export behavior, PATH shadowing risks, and compatibility caveats across shell variants and modes. * Added extensive user-facing examples and retained a documented fallback wrapper-based execution option. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.6 <[email protected]> Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
…upport * origin/master: (38 commits) fix: use env-var-driven ports in Procfile templates to support multiple worktrees (#2539) Fix prettier formatting in auto-bundling doc Docs: Clarify .client/.server suffixes vs use client RSC directive (#2406) Warn against using .server/.client variants with RSC features Docs: move internal-only docs out of published docs trees (#2414) Fix crash when HTTPX::ErrorResponse is returned in get_form_body_for_file (#2532) Skip flaky external URLs in lychee checks (#2547) Update mise docs: prefer shell-level shims over conductor-exec (#2537) Document compression middleware compatibility with streaming SSR (#2544) Fix duplicate node-renderer message reporting in render failures (#2531) Fix private_output_path not configured on fresh Shakapacker installs (#2289) Bump the npm-security group across 1 directory with 3 updates (#2387) docs: use https links (#2518) Consolidate changelog to keep only rc6 prerelease (#2533) Fix CSS module class name divergence with rspack SSR (#2489) Bump version to 16.4.0.rc.6 Add BugBot license scanning config (#2515) Fix buildVM promise cleanup ordering (#2483) (#2484) Fix streaming SSR hangs and silent error absorption in RSC payload injection (#2407) Ensure lefthook uses mise tools in non-interactive shells (#2512) ... # Conflicts: # CHANGELOG.md
## Summary - Add changelog entries for 6 user-visible PRs merged since v16.4.0.rc.6 that were missing from `[Unreleased]` - Update existing #2561 entry to include #2568 contributor credit ### New entries added | Section | PR | Description | |---|---|---| | Added | #2539 | Environment-variable-driven ports in Procfile templates | | Fixed | #2417 | Rspack generator config path fix | | Fixed | #2419 | Precompile hook load-based execution fix | | Fixed | #2577 | `create-react-on-rails-app` validation improvements | | Pro Fixed | #2416 | StreamResponse status fallback fix | | Pro Fixed | #2566 | Empty-string license plan mismatch fix | ### Skipped PRs (not user-visible) Docs (#2406, #2414, #2479, #2494, #2518, #2537, #2544), CI/internal (#2533, #2547, #2555, #2557, #2558, #2564), dependabot (#2387, #2541), dev dependencies (#2559, #2569, #2573). ## Test plan - [ ] Verify changelog formatting matches existing entries - [ ] Verify all user-visible PRs since v16.4.0.rc.6 are covered 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Documentation-only changelog updates with no runtime or build behavior changes. > > **Overview** > Updates `CHANGELOG.md`’s **[Unreleased]** section to include previously missing user-facing entries: Procfile templates now support env-driven ports, several generator/`bin/dev` precompile-hook and rspack-path fixes are documented, and `create-react-on-rails-app` validation improvements are noted. > > Also adds two Pro fix entries (StreamResponse status fallback and license plan empty-string validation) and updates the existing `bin/dev` precompile-hook entry to credit an additional PR/contributor. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit e75d2b5. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: Claude Opus 4.6 <[email protected]>
Summary
.zshenv/.bashrc/.profile+BASH_ENV/ENVexports) is the preferred approachbin/conductor-execwrapper to a fallback for users who haven't configured shell-level shimsContext
With mise shims activated in
.zshenv(which runs for all zsh shells, including non-interactive ones used by Conductor and coding agents), theconductor-execwrapper becomes unnecessary. TheBASH_ENV/ENVexports ensure child bash/sh processes also get shims.Test plan
@reference)🤖 Generated with Claude Code
Note
Low Risk
Documentation-only changes that adjust recommended setup and add guidance; no runtime or build logic is modified.
Overview
Updates
conductor-compatibility.mdto recommend enabling mise shims at the shell level (.zshenv/.bashrc/.profileplusBASH_ENV/ENV) as the primary fix for non-interactive Conductor/agent shells using system tool versions.Demotes
bin/conductor-execto a documented fallback, adds a dotfiles reference implementation, and notes a PATH-shadowing caveat when system binaries override mise shims.Written by Cursor Bugbot for commit 0554d9b. Configure here.
Summary by CodeRabbit