[Bug] Kimi RC workspace folder picker does not display symbolic link directories

Aperta Adatta ai principianti
#5,296 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@markankamaransheogarat-sys ci sta già lavorando.

Dal 24/11/2026.

  • #5360 di @markankamaransheogarat-sys — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
62/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
node.js, typescript
Ambito
backend

Direzione di ricerca

Inizia in packages/agent-core-v2/src/app/hostFolderBrowser/hostFolderBrowserService.ts: trova dove l'elenco delle directory viene costruito con readdir e filtrato su dirent.isDirectory(), che è false per i symlink. Aggiungi un ramo che esegue stat sulle voci symlink e include quelle che si risolvono in directory, ignorando gli errori per link interrotti e percorsi in loop e mantenendo i controlli esistenti sui confini del workspace. Fatto significa che le directory symlink compaiono nel RC New Workspace picker e passa un test che copre directory regolari, symlink, symlink interrotti ed errori di permessi.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug
What version of Kimi Code is running?

2.3.2

Which open platform/subscription were you using?

kimi code

Which model were you using?

kimi-3.1-pro

What platform is your computer?

linux

What issue are you seeing?

Title

[Bug] Kimi RC workspace folder picker does not display symbolic link directories

Description

The Kimi Code Remote Control (RC) web interface does not display symbolic link (symlink) directories in the workspace folder picker.

This prevents users from creating a new workspace through the RC web UI when the desired project directory is accessed via a symbolic link.

However, the same directory works correctly when launching Kimi Code from the terminal using its symlink path.

This suggests that the issue is related to directory enumeration or symlink handling in the RC workspace folder browser, rather than the underlying filesystem or Kimi Code's ability to access the target directory.

Environment

  • Kimi Code version: 2.3.2
  • Feature: Remote Control (RC) web interface
  • Affected functionality: New Workspace → Folder Picker
  • Filesystem: Symbolic links pointing to both directories inside and outside the current parent directory

Steps to Reproduce

  1. Create a symbolic link pointing to an existing project directory.

    Example:

    ln -s /data/projects/my-project /home/user/projects/my-project
    
  2. Open the Kimi Code RC web interface.

  3. Select New Workspace.

  4. Navigate to /home/user/projects/.

  5. Observe that my-project does not appear in the folder picker.

  6. Try the same directory from the terminal:

    cd /home/user/projects/my-project
    kimi
    

    Kimi Code starts successfully from the symlink directory.

Actual Behavior

  • Symbolic link directories are missing from the RC workspace folder picker.
  • Users cannot navigate into these directories through the web interface.
  • Consequently, users cannot create a new workspace using a symlink path through RC.

This affects both:

  • Symlinks pointing to directories within the current project tree.
  • Symlinks pointing to directories outside the current project tree, such as another disk or a shared project location.

Expected Behavior

The RC workspace folder picker should:

  1. Detect symbolic links that point to valid directories.
  2. Display them as navigable directories.
  3. Allow users to enter these directories.
  4. Allow users to create workspaces using either the symbolic link path or the resolved physical path.
  5. Handle broken symlinks, symlink loops, and permission errors gracefully.
  6. Preserve existing filesystem security restrictions, especially for symlinks pointing outside permitted workspace boundaries.

Ideally, users should be able to choose between preserving the original symlink path and resolving it to the physical target path.

Possible Root Cause

The directory enumeration logic in the host folder browser may only include entries for which:

dirent.isDirectory()

returns true.

In Node.js, Dirent.isDirectory() returns false for symbolic links, even when they point to valid directories.

The directory browser should also check:

dirent.isSymbolicLink()

and use stat() to determine whether the symlink target is a directory.

Relevant source file to investigate:

packages/agent-core-v2/src/app/hostFolderBrowser/hostFolderBrowserService.ts

This is a potential root cause and should be verified against the affected release.

Suggested Fix

Update the host folder browser to recognize both regular directories and symbolic links pointing to directories.

For example:

if (dirent.isDirectory()) {
  // Include regular directories
} else if (dirent.isSymbolicLink()) {
  const targetStat = await stat(entryPath);

  if (targetStat.isDirectory()) {
    // Include symbolic link directories
  }
}

The implementation should also handle broken links, permission errors, and circular symlinks without causing directory browsing to fail.

It would be useful to preserve the original symlink path while resolving the target path internally for filesystem operations, with an option to use the physical path when registering a workspace.

Workaround

Currently, a possible workaround is to launch Kimi Code directly from the symlink directory:

cd /home/user/projects/my-project
kimi

Then use /rc from the CLI to access the existing session through the Remote Control web interface.

This avoids using the RC folder picker to create the workspace, but it does not fix the underlying issue.

Request

Could the development team investigate and fix symbolic link handling in the RC workspace folder picker?

Supporting symlink directories would make RC significantly more useful for developers who organize projects using symlinks, shared directories, mounted volumes, or multiple development environments.

Thank you!

What steps can reproduce the bug?
Environment
  • Kimi Code version: 2.3.2
  • Feature: Kimi Code Remote Control (RC) Web UI
  • Affected page: New Workspace → Folder Picker
Steps to Reproduce
  1. Create a normal project directory and two symbolic links pointing to directories inside and outside the parent directory:

    mkdir -p /tmp/kimi-test/projects/real-project
    mkdir -p /tmp/kimi-test/external-project
    
    # Symlink pointing to a directory inside the parent directory
    ln -s /tmp/kimi-test/projects/real-project \
      /tmp/kimi-test/projects/internal-link
    
    # Symlink pointing to a directory outside the parent directory
    ln -s /tmp/kimi-test/external-project \
      /tmp/kimi-test/projects/external-link
    
  2. Start Kimi Code and open the Remote Control (RC) web interface.

  3. Click New Workspace to open the folder picker.

  4. Navigate to:

    /tmp/kimi-test/projects/
    
  5. Observe that the normal directory real-project is visible, but the symbolic link directories internal-link and external-link are missing.

  6. Try accessing the same directories through the terminal:

    cd /tmp/kimi-test/projects/internal-link
    kimi
    

    Kimi Code launches successfully from the symbolic link directory.

  7. Repeat the test with external-link. The same issue occurs in the RC folder picker.

Actual Result

Symbolic link directories are not displayed in the RC workspace folder picker, so users cannot navigate into them or create workspaces through the web interface.

What is the expected behavior?
Expected Result

Both internal and external symbolic links pointing to valid directories should be displayed and navigable in the folder picker. Users should be able to create workspaces using either the symlink path or the resolved physical path.

Additional information
Additional Information

This issue occurs before a workspace or session is created, so a session ID and context usage are not applicable.

Launching Kimi Code directly from a symlink directory via the CLI works correctly. Using /rc to expose the existing CLI session through the web interface is a possible workaround.

Contribution
  • I am willing to submit a PR for this bug fix myself (please wait for maintainer approval in this issue first)
Lingua principale
TypeScript
Stelle
8.3k
Fork
1.4k
Merge medio
12h 6m
PR unite (30g)
596

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di MoonshotAI/kimi-code

Tutte le issue di MoonshotAI/kimi-code

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.