fix: pre-trust mise config in worktree PTY env so startup script isn't eaten#110
Merged
Conversation
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
misehook fires during.bashrcand prompts "Trust them?" with a single-keypress reader. 100ms later,task-terminal.tsxwrites the startup heredoc (source /dev/stdin <<'FULCRUM_STARTUP_…'\nmise trust\nmise worktree-init\n…). mise consumessource /dev/stdinas keypresses (defaulting to "No"), so the shell only sees the heredoc starting at<<'FULCRUM_STARTUP_…'— a heredoc with no command in front. The body is silently swallowed,mise trustandmise worktree-initnever run, and the agent's firstmise run devfails because the worktree'smise.tomlis still untrusted.MISE_TRUSTED_CONFIG_PATHS=<worktree-cwd>on both PTY spawns inserver/terminal/terminal-session.ts(create + attach). The shell hook now sees the worktree as already trusted, never prompts, and the startup heredoc reaches the shell intact. The repo'smise trustline still runs as part of the startup script and persists trust system-wide for any direct shell sessions.Test plan
mise.toml— confirm no "Trust them?" prompt appears andmise trust/mise worktree-initrun cleanly before the agent commandmise run dev(or equivalent) succeeds on a fresh worktreemise trustfrom the startup script should have persisted, so no prompt🤖 Generated with Claude Code