Skip to content

fix: pre-trust mise config in worktree PTY env so startup script isn't eaten#110

Merged
knowsuchagency merged 2 commits into
mainfrom
it-seems-like-on-kft7
May 6, 2026
Merged

fix: pre-trust mise config in worktree PTY env so startup script isn't eaten#110
knowsuchagency merged 2 commits into
mainfrom
it-seems-like-on-kft7

Conversation

@knowsuchagency

Copy link
Copy Markdown
Owner

Summary

  • On task start, the worktree shell's mise hook fires during .bashrc and prompts "Trust them?" with a single-keypress reader. 100ms later, task-terminal.tsx writes the startup heredoc (source /dev/stdin <<'FULCRUM_STARTUP_…'\nmise trust\nmise worktree-init\n…). mise consumes source /dev/stdin as 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 trust and mise worktree-init never run, and the agent's first mise run dev fails because the worktree's mise.toml is still untrusted.
  • Set MISE_TRUSTED_CONFIG_PATHS=<worktree-cwd> on both PTY spawns in server/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's mise trust line still runs as part of the startup script and persists trust system-wide for any direct shell sessions.

Test plan

  • Start a worktree task in a repo with an untrusted mise.toml — confirm no "Trust them?" prompt appears and mise trust / mise worktree-init run cleanly before the agent command
  • Confirm the agent's first mise run dev (or equivalent) succeeds on a fresh worktree
  • Open a fresh shell directly into the worktree (outside fulcrum) — mise trust from the startup script should have persisted, so no prompt

🤖 Generated with Claude Code

@knowsuchagency knowsuchagency merged commit 2c32024 into main May 6, 2026
2 checks passed
@knowsuchagency knowsuchagency deleted the it-seems-like-on-kft7 branch May 6, 2026 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant