Skip to content

Guide sessions into mounted Git working trees#53

Draft
heimanba wants to merge 2 commits into
mainfrom
agent/git-session-working-tree
Draft

Guide sessions into mounted Git working trees#53
heimanba wants to merge 2 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
Change-Id: I3be5fd219283020e88121c24cfa8d888915cd2d3
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