MCPcopy Create free account
hub / github.com/codeaashu/claude-code / buildWorktreeNotice

Function buildWorktreeNotice

src/tools/AgentTool/forkSubagent.ts:205–210  ·  view source on GitHub ↗
(
  parentCwd: string,
  worktreeCwd: string,
)

Source from the content-addressed store, hash-verified

203 * potentially stale files, and that its changes are isolated.
204 */
205export function buildWorktreeNotice(
206 parentCwd: string,
207 worktreeCwd: string,
208): string {
209 return `You've inherited the conversation context above from a parent agent working in ${parentCwd}. You are operating in an isolated git worktree at ${worktreeCwd} — same repository, same relative file structure, separate working copy. Paths in the inherited context refer to the parent's working directory; translate them to your worktree root. Re-read files before editing if the parent may have modified them since they appear in the context. Your changes stay in this worktree and will not affect the parent's files.`
210}
211

Callers 1

callFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected