From 29b7579db812604ad960ca3531bfb6db69f06069 Mon Sep 17 00:00:00 2001 From: Adam Bowker Date: Thu, 30 Apr 2026 22:08:31 +0000 Subject: [PATCH] fix(agent): include posthog-code/ branch prefix in global instructions The branch prefix convention was only injected into the auto-create-PR cloud prompt. When a cloud session ran in review-only mode and the user later asked the agent to create a branch, the agent had no convention loaded and fell back to its own default. Move the prefix instruction into the globally-appended BRANCH_NAMING block so it applies to every prompt branch. Generated-By: PostHog Code Task-Id: d218229f-4d24-49e8-b6cb-062ed96171f5 --- packages/agent/src/adapters/claude/session/instructions.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/agent/src/adapters/claude/session/instructions.ts b/packages/agent/src/adapters/claude/session/instructions.ts index 4ba617306..792be41d0 100644 --- a/packages/agent/src/adapters/claude/session/instructions.ts +++ b/packages/agent/src/adapters/claude/session/instructions.ts @@ -2,6 +2,8 @@ const BRANCH_NAMING = ` # Branch Naming When working in a detached HEAD state, create a descriptive branch name based on the work being done before committing. Do this automatically without asking the user. + +When creating a new branch, prefix it with \`posthog-code/\` (e.g. \`posthog-code/fix-login-redirect\`). `; const PLAN_MODE = `