Skip to content

[Feature]: Support multi-directory context linking / flexible multi-folder workspaces (Claude Code parity) #14267

Description

@alexwork1611

Problem / Motivation

In modern development workflows, projects frequently span beyond a single Git repository root. Common setups include:

  • Multi-repository microservices (e.g., separate \ rontend, \�ackend, and \shared-contracts\ repositories).
  • External documentation, design systems, or API specs maintained in separate folders.
  • Monorepos with sibling packages, or external local utilities referenced without merging everything into a single repo.

Currently, T3 Code binds each conversation/thread tightly to a single project's Git root. When an agent needs to reference or cross-check code across multiple folders/projects, the user must either switch between isolated threads or manually copy files into the active worktree, breaking continuity.

Proposed Solution: Flexible Multi-Directory / Project Context System

Similar to Claude Code's /add-dir\ and --add-dir\ capabilities, introduce a flexible mechanism to attach and manage one or more secondary directories/projects within an active conversation:

  1. Multiple Folder / Repository Attachment:

    • Support adding an arbitrary number of supplementary directories to an active conversation thread.
    • Accessible via both GUI controls (e.g., an "Attached Folders / Context" section in the thread sidebar/inspector) and conversational slash commands (e.g., /add-dir \ or /link ).
  2. Granular Access Control & Modes:

    • Read-only vs. Read-write: Allow setting mounted directories to reference-only (for documentation, shared types, or sibling services) or editable.
    • Git Integration: When a linked directory is a Git repository, allow the agent to inspect git status/diffs while respecting its separate git boundary.
  3. Tool & Context Awareness:

    • Ensure file search, grep/ripgrep, file reading, and MCP servers can discover and resolve paths across all attached roots in that session.
    • Prefix or scope paths clearly in agent tool calls to avoid collisions between identically named files across distinct directories.
  4. Persistence & Presets:

    • Save attached directories per thread or allow users to define workspace presets grouping related project folders together.

Alternatives Considered

  • Moving all repositories into an overarching monorepo (often infeasible for teams or existing infrastructure).
  • Using OS symlinks into the active worktree (fragile across OS platforms, especially Windows/macOS, and pollutes git status).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions