Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions AGENTS.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -288,20 +288,20 @@ the inference did not follow — body rewriting is a known platform behaviour an
evidence of nothing else. When state you did not write changes under you: read the
timeline event's actor, or ask. Undo it only once you know who set it and why.

**Write the attribution footer in its session-URL form** — the half of the above you
can act on directly:
**Write the attribution footer in the form the surface keeps:**

```text
_Generated by [Claude Code](https://claude.ai/code)_ ← stripped on edit
_Generated by [Claude Code](https://claude.ai/code/session_<id>)_ ← survives
_Generated by [Claude Code](https://claude.ai/code)_ ← bare: use in COMMENTS
_Generated by [Claude Code](https://claude.ai/code/session_<id>)_ ← session-URL: use in PR BODIES
```

A body ending in the bare form loses the **whole** footer, `---` separator included, on
every `update_pull_request` edit; the session-URL form survives both write paths.
`create_pull_request` does not strip; it *rewrites* the bare form into the session form
— which is precisely how a body comes back in a shape nobody typed. Which layer does
this is unknown, and the guidance does not depend on the answer — do not spend a
session establishing it. Comments are a different path and unaffected.
**PR body:** bare loses the **whole** footer, `---` included, on every `update_pull_request` edit;
session-URL survives both write paths, and `create_pull_request` *rewrites* bare into it — how a
body comes back in a shape nobody typed. **Issue comment:** the platform APPENDS a bare footer to
every one (measured 2026-08-20 — MCP `add_issue_comment` and direct REST agree: per-surface, not
per-tool). It is idempotent if yours is already bare; if yours is the session-URL form *it survives
verbatim* and a bare one lands under it, leaving two. ⛔ A tail bare footer on a comment is the
platform's, not your form downgraded. Which layer does this is unknown; don't go establishing it.

**GitHub mutates body BYTES — spell poison-shaped tokens out in words, never literally.**
Regex literals and script-tag-shaped tokens go in fenced code with the dangerous
Expand Down
Loading