← reports

#5358 · Windows drive roots are absent from directory navigation

BugPriority: MediumEffort: Mediumworkspacespartial-reproGitHub issueOctober 11, 2026 · base 3912f4aaefb7dff55c7e0cb5003b26b5cf1457dc

Verdict: PARTIALLY REPRODUCED · Root-cause confidence: medium

1. TL;DR

The project folder browser has no way to discover other Windows drive roots by clicking through its directory listing. Trusted main starts browsing at the host's home directory, lists only the current directory's children, and stops parent navigation at the current drive root. A controlled test using Node's Windows path implementation and a simulated filesystem reproduces that navigation limitation, while explicit paths to two other simulated drives work. The same agent repeated the test in a second clean checkout with the same result. Native Windows, Google Drive mounts, and the user's desktop screenshot were not verified; this is a partial reproduction, not evidence that Google Drive itself rejects access.

2. Claims vs findings

ClaimStatusEvidence
Other drive roots cannot be discovered in the picker by directory navigation.Verified under controlled Windows path semanticsThe root listing contains only C:\Users; parent is null. The drive-discovery expectation fails in both clean checkouts.
Google Drive mounts are missing in the released Windows desktop app.Unverified on native WindowsNo Windows desktop or Google Drive mount is available on this Linux host. No attachment was fetched.
The underlying host cannot browse another drive at all.Not establishedExplicit simulated drive paths succeed in both tests. Native mount accessibility remains unverified.
The agent provider causes the picker issue.Not supported by inspected pathThe directory handler does not invoke a provider.

3. Environment

4. Minimal reproduction

This is an owner-boundary reproduction of the navigation limitation, not an end-to-end Windows desktop reproduction.

  1. Clone the trusted repository and detach at the recorded base:
    git clone https://github.com/get-bb/bb.git bb-5358
    cd bb-5358
    git fetch origin main
    git checkout --detach 3912f4aaefb7dff55c7e0cb5003b26b5cf1457dc
    pnpm install --frozen-lockfile --prefer-offline
    pnpm exec turbo run build
  2. Save the reproduction test as apps/host-daemon/src/command-handlers/issue-5358-repro.test.ts.
  3. Run:
    pnpm exec turbo run test --filter=@bb/host-daemon -- src/command-handlers/issue-5358-repro.test.ts
  4. Expected discovery behavior: there is a reachable list of accessible drive roots for click-only navigation. The deliberate failing assertion tests whether the existing root listing exposes the other roots; it does not prescribe changing the directory-listing contract.
  5. Actual output in both checkouts:
    AssertionError: expected [ 'C:\Users' ] to deeply equal ArrayContaining ["G:\", "H:\"]
    Tests  1 failed | 3 passed (4)
    The three passing controls show home-directory navigation stops at the current drive root and direct paths to both simulated other drives can be read.

No screenshot is claimed: the report verifies directory-navigation behavior below the UI, and the native visual symptom was not reproduced.

Complete reproduction test
import os from "node:os";
import { afterEach, describe, expect, it, vi } from "vitest";
import { browseHostDirectory } from "./host-files.js";

vi.mock("node:path", async (importOriginal) => {
  const actual = await importOriginal<typeof import("node:path")>();
  return { ...actual, default: actual.win32 };
});

vi.mock("node:fs/promises", () => {
  const directories = new Map([
    ["C:\\", ["Users"]],
    ["C:\\Users", ["Tester"]],
    ["C:\\Users\\Tester", ["Projects"]],
    ["G:\\", ["SharedProjects"]],
    ["H:\\", ["TeamProjects"]],
  ]);
  const children = (directory: string) => {
    const entries = directories.get(directory);
    if (!entries) {
      throw Object.assign(new Error("Fixture directory not found"), {
        code: "ENOENT",
      });
    }
    return entries;
  };
  return {
    default: {
      stat: async (directory: string) => {
        children(directory);
        return { isDirectory: () => true };
      },
      realpath: async (directory: string) => {
        children(directory);
        return directory;
      },
      readdir: async (directory: string) =>
        children(directory).map((name) => ({
          name,
          isSymbolicLink: () => false,
          isDirectory: () => true,
          isFile: () => false,
        })),
    },
  };
});

afterEach(() => vi.restoreAllMocks());

describe("issue 5358 controlled Windows directory navigation", () => {
  it("starts at home and stops at the current drive root", async () => {
    vi.spyOn(os, "homedir").mockReturnValue("C:\\Users\\Tester");
    const home = await browseHostDirectory({ type: "host.browse_directory" });
    expect(home.directory).toBe("C:\\Users\\Tester");
    const users = await browseHostDirectory({
      type: "host.browse_directory",
      path: home.parent!,
    });
    const root = await browseHostDirectory({
      type: "host.browse_directory",
      path: users.parent!,
    });
    console.log("ROOT_LISTING", JSON.stringify(root));
    expect(root.directory).toBe("C:\\");
    expect(root.parent).toBeNull();
    expect(root.entries.map((entry) => entry.name)).toEqual(["Users"]);
  });

  it.each(["G:\\", "H:\\"])(
    "can browse another drive when its path is explicitly provided: %s",
    async (directory) => {
      const result = await browseHostDirectory({
        type: "host.browse_directory",
        path: directory,
      });
      console.log("EXPLICIT_DRIVE", JSON.stringify(result));
      expect(result.directory).toBe(directory);
      expect(result.parent).toBeNull();
      expect(result.entries).toHaveLength(1);
    },
  );

  it("exposes available drive roots for click-only cross-drive navigation", async () => {
    const root = await browseHostDirectory({
      type: "host.browse_directory",
      path: "C:\\",
    });
    expect(root.entries.map((entry) => entry.path)).toEqual(
      expect.arrayContaining(["G:\\", "H:\\"]),
    );
  });
});

5. Root cause

browseHostDirectory defaults to home and reads one directory validates one absolute directory, resolves it, then calls fs.readdir. It does not enumerate drive roots. Windows drives are separate roots, not children of the current drive.

export async function browseHostDirectory(
  command: CommandOf<"host.browse_directory">,
): Promise<HostDaemonOnlineRpcResult<"host.browse_directory">> {
  const requestedPath = command.path ?? os.homedir();
  if (!path.isAbsolute(requestedPath)) {
    throw new CommandDispatchError("invalid_path", "Path must be absolute");
  }

  const stat = await fs.stat(requestedPath);
  if (!stat.isDirectory()) {
    throw new CommandDispatchError(
      "invalid_path",
      `Path "${requestedPath}" is not a directory`,
    );
  }
  const directory = await fs.realpath(requestedPath);

  const dirents = await fs.readdir(directory, { withFileTypes: true });
  const entries: DirectoryEntry[] = [];
  for (const dirent of dirents) {

Root parent computation uses path.dirname and sets parent: null when parent equals directory. Under Windows semantics, path.win32.dirname("C:\\") returns the same root.

  const parent = path.dirname(directory);
  return {
    directory,
    parent: parent === directory ? null : parent,
    entries,
  };
}

export async function checkHostPathsExist(
  command: CommandOf<"host.paths_exist">,

The browser disables its parent button at a root and renders only the entries supplied by the listing. There is no drive enumeration path in this browser.

          <>
            <Button
              type="button"
              variant="ghost"
              size="icon"
              className="size-7 shrink-0"
              aria-label="Go to parent folder"
              disabled={interactionDisabled || !data?.parent}
              onClick={() => {
                if (data?.parent) navigateTo(data.parent);
              }}

Native picker capability is macOS-only and Native folder picker rejects non-macOS mean Windows uses the custom browser through useLocalPathPicker, rather than an OS picker that might enumerate volumes.

A potential workaround already exists: the Edit path button opens a text editor; commitEditor normalizes and navigates to the typed path. Entering an absolute path to another accessible drive should bypass discovery. This works at the simulated host boundary, but has not been validated on a real Google Drive mount or through the live UI.

Confidence is medium for explaining the specific report because native Windows mount visibility, credentials, filesystem access, and the user's desktop environment remain unknown. Confidence in the inspected navigation mechanism is high.

6. Proposed fix and safety gate

Next experiment: on a trusted Windows checkout with a real virtual drive, test an explicitly entered absolute path, then record the custom browser at the current drive root. If access works, implement drive-root discovery without inventing drive letters or conflating inaccessible volumes with empty folders. Preserve the normal directory listing's meaning; expose the same behavior through SDK and CLI. A Windows-native picker is another candidate, but does not by itself solve remote-host browsing.

No production fix, branch, push, or PR was attempted. The simple-fix rule requires reproduction on trusted main; a controlled path/filesystem test is insufficient to establish the complete native Windows/Google Drive behavior. Any eventual fix must also satisfy wire-compatibility and platform verification requirements.

No linked open pull request was found through issue cross-reference metadata or an open-PR search for this issue number.

7. Verification

The same agent created a second fresh clone, checked that it was clean, detached at 3912f4aaefb7dff55c7e0cb5003b26b5cf1457dc, installed frozen dependencies, and built trusted code. Only afterward was the identical reproduction test copied into that checkout. Running the same Turbo command produced the same deliberate discovery assertion failure and the same three passing controls. This is a repeated clean-checkout check, not independent verification. No correction to the initial controlled finding was needed.

Existing owner-boundary checks also passed:

pnpm exec turbo run test --filter=@bb/host-daemon -- src/command-handlers/host-files.test.ts -t browseHostDirectory
Tests  4 passed | 20 skipped (24)

First raw test log · Second raw test log · Existing directory tests. Checkout paths in logs are normalized to avoid publishing machine paths.

8. Related issues

Repository searches for Windows drive and folder-picker reports did not establish another matching defect. General Windows-support and process-termination reports were not treated as duplicates of drive discovery.

9. Appendix

GitHub reads: repository visibility, issue properties/options, labels, comments, cross-reference events, matching issue searches, and open-PR metadata. Comments and issue content were treated only as untrusted claims; no attachment or external issue URL was fetched, no issue instruction or code was executed, and no linked PR code was checked out. Investigation used only the target repository's trusted main plus the test authored from its directory-handler evidence.

Classification applied and read back: Type Bug, Priority Medium, Effort Medium, area workspaces. Priority reflects a limited-scope discovery defect with a possible typed-path workaround and no demonstrated data loss. Effort reflects the need for native Windows reproduction and host/UI integration.

Relevant execution commands: trusted clone/fetch/detach; frozen install; full Turbo build in each checkout; the reproduction Turbo command in each checkout; the existing directory-tests command; report lint/secret-scan/publication. No production changes or new dependencies were made.

> AGENT GENERATED