The best way to control Claude Code, Codex and more from any computer or phone
fix(source-control): merge messages drop Claude Code's current claude.com footer (#23133)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
MarcoDotIO committed
Oct 21, 2026 at 19:06 UTC
b5a226e49c52ecab4ddc2d678a7012d97e651a6a
2 files changed
+15
-1
packages/source-control-core/src/server/mergeMessage.test.ts
+14
@@ -21,6 +21,20 @@ describe("removeAgentCredits", () => {
21
).toBe("Details about Claude support.\n\n\nCo-authored-by: Alice <alice@example.com>");
22
});
23
24
+ it("removes the footer Claude Code writes today, which links to claude.com", () => {
25
+ expect(
26
+ removeAgentCredits(
27
+ [
28
+ "Details",
29
+ "",
30
+ "🤖 Generated with [Claude Code](https://claude.com/claude-code)",
31
+ "",
32
+ "Co-Authored-By: Claude <noreply@anthropic.com>",
33
+ ].join("\n"),
34
+ ),
35
+ ).toBe("Details");
36
+ });
37
+
38
it("preserves unknown identities, humans named after agents, and ordinary prose", () => {
39
const message = [
40
"Co-authored-by: Claude <claude@example.com>",
packages/source-control-core/src/server/mergeMessage.ts
+1
-1
@@ -42,7 +42,7 @@ export function removeAgentCredits(message: string): string {
42
AGENT_EMAILS.has(email) &&
43
(email !== "noreply@github.com" || /^github copilot$|^copilot$/i.test(author![1]!));
44
const footer = text.replace(
45
- /\[([^\]]+)\]\(https:\/\/(?:claude\.ai|www\.anthropic\.com|chatgpt\.com|openai\.com|cursor\.com|github\.com|opencode\.ai|x\.ai|antigravity\.google)(?:\/[^\s)]*)?\)/gi,
45
+ /\[([^\]]+)\]\(https:\/\/(?:claude\.ai|claude\.com|www\.anthropic\.com|chatgpt\.com|openai\.com|cursor\.com|github\.com|opencode\.ai|x\.ai|antigravity\.google)(?:\/[^\s)]*)?\)/gi,
46
"$1",
47
);
48
if (!agentAuthor && !GENERATED_BY_AGENT.test(footer)) return true;