Files
martmull 2f5e9d47ef Suppress Claude session URL in generated PR bodies and commits (#22651)
## Context

PRs generated by Claude Code web sessions (e.g. #22648) still carried a
bare `claude.ai/code/session_...` link and a "Generated by Claude Code"
footer, which do not comply with the project's committed Claude
settings.

The existing `.claude/settings.json` already set `attribution.commit`
and `attribution.pr` to empty strings, which suppresses the generic
"Generated with Claude Code" footer. But the web session URL is a
separate feature: web sessions add the session link to PR bodies and a
`Claude-Session` git trailer to commits, controlled by
`attribution.sessionUrl` (available from Claude Code v2.1.182), not by
the `commit`/`pr` attribution text. Since that field was unset, the
session link leaked through.

## Changes

- `.claude/settings.json`:
- Add `"sessionUrl": false` to the `attribution` object so the session
URL is omitted from both PR bodies and commit trailers.
- Extend the `SessionStart` hook instructions to explicitly cover GitHub
PR descriptions, PR/issue comments and reviews (not just commits and
files), and to discourage code comments unless strictly necessary
(TypeScript directives or short "why" comments for non-obvious business
logic).

## Notes

The public schemastore schema referenced by `$schema` lags behind the
CLI and does not yet list `sessionUrl`, so editors may show a harmless
validation hint until it updates. The Claude Code parser supports the
field, per the on-the-web docs.

Co-authored-by: martmull <martin@twenty.com>
2026-07-08 10:51:48 +02:00
..