b4382b08ad
Claude Code chats now start with the chat directory's own environment: direnv (allowed .envrc only, via direnv export json) and mise (mise env --json), cached per directory and invalidated when config, watched files or allow records change. A blocked .envrc is logged and shown in the chat as a notice and never applied. When the directory chooses the Claude account (CLAUDE_CONFIG_DIR, API key or token variables), the server's service token and login-file fallbacks are skipped and inherited credentials dropped. Transcripts in a directory's CLAUDE_CONFIG_DIR are found for history, resume and after a restart. PWD is set to the chat directory.