Skip to content

Guide sessions into mounted Git working trees#53

Merged
heimanba merged 4 commits into
mainfrom
agent/git-session-working-tree
Jul 22, 2026
Merged

Guide sessions into mounted Git working trees#53
heimanba merged 4 commits into
mainfrom
agent/git-session-working-tree

Conversation

@heimanba

Copy link
Copy Markdown
Contributor

What changed

  • prepare the first Session message from the complete resolved Session bindings
  • tell the Agent the mounted Git working-tree path and provide a safely quoted cd -- <path> && shell prefix
  • direct non-shell file tools to absolute paths beneath the mounted working tree
  • derive repository mount names from HTTP(S) and scp-style SSH Git remotes
  • keep multi-repository Sessions neutral by listing all working trees without selecting one
  • document the behavior and stop hard-coding a generic repository path in the Claude example

Why

Git resources are attached while the Session is created, but the first task was previously sent as a separate message without telling the Agent where the repository was mounted. This could cause development commands and file tools to run outside the intended working tree.

Impact

New Sessions with one mounted Git repository receive an actionable working-directory prefix in their first user message. Repository URLs and credentials are not included. Sessions without repositories and subsequent messages retain their existing behavior.

Validation

  • pre-push verify:push profile
  • type checks for every workspace
  • architecture dependency and semantic checks
  • all repository test suites
  • changed-file lint
  • 630 SDK tests, including mount-path derivation, shell quoting, credential non-disclosure, and runtime message forwarding

Change-Id: I5af1ca42d79c4d94cdf8f4e3a7d799e0270fce4e
Comment thread packages/sdk/src/internal/utils/sandbox-mount.ts Fixed
Comment thread packages/sdk/src/internal/utils/sandbox-mount.ts Fixed
heimanba and others added 3 commits July 21, 2026 23:43
Change-Id: I3be5fd219283020e88121c24cfa8d888915cd2d3
Change-Id: I2dacf2c9b99070da7593ac0c9293dd3034c4d102
@heimanba
heimanba marked this pull request as ready for review July 22, 2026 01:29
@heimanba
heimanba merged commit e537ab3 into main Jul 22, 2026
14 checks passed
@heimanba
heimanba deleted the agent/git-session-working-tree branch July 22, 2026 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants