fix: agents not appearing on Linux Mint (and likely macOS) when no folder is open#70
Open
d4rkd0s wants to merge 2 commits intopablodelucca:mainfrom
Open
fix: agents not appearing on Linux Mint (and likely macOS) when no folder is open#70d4rkd0s wants to merge 2 commits intopablodelucca:mainfrom
d4rkd0s wants to merge 2 commits intopablodelucca:mainfrom
Conversation
When VS Code is launched without a folder (e.g. bare `code` command, common on Linux and macOS), `workspaceFolders` is empty and `getProjectDirPath()` returned null. This caused `launchNewTerminal()` to bail out early before sending `agentCreated` to the webview, so no character ever appeared despite the terminal being created. Fix: fall back to `os.homedir()` in both `getProjectDirPath` and the `cwd` used for terminal creation. This matches the directory Claude Code itself uses when started with no explicit working directory, ensuring the extension correctly locates the JSONL transcript files. Windows behavior is unchanged: workspaceFolders is always populated in the common Windows workflow, so the fallback is never reached there. Co-Authored-By: Logan <d4rkd0s@github.com>
- Add platform support note to Requirements section - Replace "Windows-only testing" known limitation with a helpful tip for Linux/macOS users launching VS Code without a workspace folder open Co-Authored-By: Logan <d4rkd0s@github.com>
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.
Confirmed working on Linux Mint. If you launch VS Code without a folder
open (just `code` on its own, which is the natural way to open it on
Linux and macOS), clicking + Agent would start Claude in a terminal but
no character would ever appear in the office.
The extension was silently bailing out because it couldn't determine a
project directory when no workspace folder was set. The fix falls back
to the home directory, which is exactly where Claude Code writes its
session files in that scenario. macOS should work too for the same
reason. If any Mac users run into issues, drop a comment and we can
patch it quickly.
Windows behavior is unchanged.
Tested on