You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A fresh worktree now sets itself up. Creating a worktree copies the
gitignored .env* files over from the main checkout — a worktree starts
with tracked files only, so env files and local credentials were always
missing from a new checkout. A .worktreeinclude file at the repository
root overrides the patterns (globs, one per line; a slashless pattern
matches by basename at any depth). Wholly ignored directories
(node_modules, build output) are never copied — installing those is the
job of the new per-project setup script (Settings › Worktree), which
runs in the new worktree session's terminal ahead of the agent, so a pnpm install happens where you can watch it. The session opens even if
the script fails, resuming a kept worktree never re-runs it, and Windows
skips the script wrap while the port stays experimental.
Fixed
A session spawned directly on a provider now inherits your login shell's
environment. lich is a GUI app, never started from a terminal, so its env
snapshot is the graphical session's — it never sourced .zshrc/.bashrc/ config.fish/.profile. A shell session hid this (the spawned $SHELL
sources its own rc), but a provider spawned directly (Claude Code, Codex, …)
saw only the launch env, so a ${VAR} expansion in .mcp.json — e.g. an MCP
server's auth token exported in your rc — came up empty. lich now resolves the
shell env once at startup ($SHELL -l -i -c dump) and merges it over the
launch snapshot, so both provider and shell sessions get the full environment.
Best-effort: $SHELL unset or any failure keeps the launch env. Windows
without a $SHELL (env lives in the registry) is not covered.
Closing a worktree session only prompts to remove the checkout when it is
the last one there. A worktree can host more than one session — a provider
plus a hand-opened shell rooted at the same path — and closing the throwaway
shell offered to remove the whole checkout, so one accidental confirm discarded
the provider's work. The prompt is now gated on the closing session being the
last occupant of its worktree path; while a sibling still lives there, closing
just closes.