Skip to content

Multi-repo sessions don't tell the agent which repos are in the project when the repos are inside the workspace root #309

Description

@dotrahat

Symptom

My project's .code-workspace file is in my home folder and lists five repos that are also in my home folder. I asked Claude "Give me list of repos that are part of this project", twice in T3 Code and twice in the Claude Code VS Code extension.

  • VS Code: it checked the five repos and listed them. Correct both times.
  • T3 Code: it searched my home folder for repos.
    • First run: it listed 14 repos from another tool's config file as the project. 10 of them aren't in the project, and it missed one of the five.
    • Second run: it listed the right five, plus 11 other repos from my home folder that aren't in the project, as related clones.

T3 Code 0.0.42 (Linux AppImage) built from the #307 branch, Claude Code 2.1.282 in both apps. The code involved is the same on multi-repo-workspaces @ 1d386b99a.

Cause

Each app starts Claude Code with a working directory and a list of extra folders. Claude Code then writes a short environment block for the model. In that block, it lists only the extra folders that are outside the working directory. Here is what each step passed along, from the session logs.

VS Code → Claude Code: it starts in the first folder of the workspace.

working directory: /home/<user>/<repo-1>
extra folders:     /home/<user>/<repo-2> … /home/<user>/<repo-5>

Claude Code → model: none of the extra folders is inside <repo-1>, so all four are kept.

Primary working directory: /home/<user>/<repo-1>
Is a git repository: true
Additional working directories:
  - /home/<user>/<repo-2> … /home/<user>/<repo-5>

The model sees all five repos.

T3 Code → Claude Code: it starts in the folder that holds the .code-workspace file (WorkspaceManifest.ts:9-10), and passes the repos as extra folders (ClaudeAdapter.ts:4913-4919).

working directory: /home/<user>
extra folders:     /home/<user>
                   /home/<user>/<repo-1> … /home/<user>/<repo-5>
                   /home/<user>/.t3/userdata/attachments

Claude Code → model: every extra folder is inside /home/<user>, so all of them are dropped.

Primary working directory: /home/<user>
Is a git repository: false

The model sees no repos. It sees only a home folder that isn't a repo, so it searches it.

A test project shows the same rule. <root> holds api, web and shared, and outlier-repo is outside it. T3 Code passed all four repos, and the model saw only the folders outside <root>:

Primary working directory: <root>
Is a git repository: false
Additional working directories:
  - /home/<user>/Downloads/outlier-repo
  - /home/<user>/.t3/userdata/attachments

<root> holds no other repos, so a search there still found the right ones, and T3 Code answered correctly both times.

Other providers. T3 Code doesn't pass the repo list to Cursor, Grok, OpenCode or Antigravity. They get the working directory, and Antigravity also gets the attachments folder. Codex gets the repos through skills/extraRoots/set (CodexSessionRuntime.ts:2463). I couldn't confirm whether that tells the model about them. I only tested Claude.

Possible fix

A. List the repos in the multi-repo block that #307 adds to RuntimeInstructions.ts: "This project's repositories are <repo-1>, <repo-2>, …". All six providers already get that block.

B. Also start the session in the first repo, as VS Code does for Claude. In this project, the other repos would then be outside the working directory, so Claude Code would list them for the model. But T3 Code uses the session's working directory in a few more places:

  • Codex: its auto modes use the workspace-write sandbox, and T3 Code sets no writableRoots (CodexSessionRuntime.ts:528-539, 575-579). I haven't checked which folders Codex could write to after the change.
  • CLAUDE.md: T3 Code turns on Claude's project settings (ClaudeAdapter.ts:1545-1548), and Claude Code reads the project CLAUDE.md from its working directory. That would become the first repo's.
  • Git status after each turn is refreshed for the session's working directory (CheckpointReactor.ts:669-676). That would be the first repo.
  • Running sessions restart when the working directory changes, and resume their conversation in the new folder (ProviderCommandReactor.ts:780-831). I haven't checked whether Claude can resume a conversation from a different folder.

I haven't tried either option yet. Without A, Cursor, Grok, OpenCode and Antigravity still aren't told the repos. Is B worth it, and was there a reason to start in the .code-workspace folder?

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions