Sep 14 edition/Reporting & analysis
CodingAgentsSafetyBusiness

CodingSoftware & developer tools

commit-rewriter 0.1 adds a local UI for cleaning Git commit messages after AI-assisted coding

Simon Willison’s commit-rewriter 0.1 is a small Python web app for batch-editing Git commit messages before publication, aimed at removing coding-agent artifacts and private references while preserving a reviewable workflow around inherently risky history rewrites.

THE CORE IDEAS4 TAKEAWAYS
01

commit-rewriter 0.1 is documented as a local Python web app for editing Git commit messages, not as an AI model, agent, or hosted service. [1] [7] [8] [12]

02

The maintainer-reported use case was cleaning coding-agent artifacts and private issue references from commits prepared for Datasette security releases. [1] [14]

03

The tool rewrites commit objects from the first edited commit through the branch tip, which changes descendant hashes and removes invalidated signatures; it creates a backup branch and does not push changes. [1] [6] [10] [11]

04

Git’s own documentation and GitHub branch-protection controls frame this as a pre-publication cleanup workflow, not a safe way to casually edit shared or signed history. [4] [5]

WHY IT MATTERS

Evidence from the release note, package metadata, source and tests shows a narrow developer tool for making AI-assisted commit history more presentable before publication.

Read the full assessment

The implication is broader: as coding agents generate more repository metadata, teams need review gates for what enters the permanent audit trail. But history rewriting also weakens continuity if used after sharing, so managers should pair such tools with branch protections, signing policy and human review.

Bottom line: commit-rewriter 0.1 is a small Python local web app for batch-editing Git commit messages, motivated by the practical problem of cleaning AI-agent-generated commit “cruft” and private issue references before publishing security-release history. It is not itself an AI model or agent, but it sits squarely in the AI-assisted software-development workflow: it is a tool for repairing the human-facing audit trail after agentic coding work.


Executive brief

Simon Willison released commit-rewriter 0.1 on September 14, 2026 as a Python web app that runs locally against a Git repository and lets a user edit recent commit messages through a browser UI. The stated origin was Datasette security releases whose initial commits included coding-agent artifacts and private repository issue IDs that were not suitable for publication. The tool is launched with uvx commit-rewriter path/to/repo, or without a path when run inside the target repository.

Read the full section

Simon Willison released commit-rewriter 0.1 on September 14, 2026 as a Python web app that runs locally against a Git repository and lets a user edit recent commit messages through a browser UI. The stated origin was Datasette security releases whose initial commits included coding-agent artifacts and private repository issue IDs that were not suitable for publication. The tool is launched with uvx commit-rewriter path/to/repo, or without a path when run inside the target repository. Release: commit-rewriter 0.1

For practitioners, the useful part is convenience: instead of performing a manual interactive rebase or scripted history rewrite, users can review many commit messages in one interface, search/filter them, inspect diffs, and submit edits in batch. The important risk is also explicit: the tool rewrites commit objects from the first edited commit through the branch tip, which changes descendant hashes and removes invalidated commit signatures. The project’s own UI states that descendant hashes change, invalidated signatures are removed, and no changes are pushed. Release: commit-rewriter 0.1

For business leaders and security teams, the release is a small but telling example of a larger governance problem: AI-generated development work may leave private or low-quality traces in commit metadata, but rewriting those traces can weaken the evidentiary value of Git history if used after commits have been shared or signed. Git’s own documentation warns against amending commits that have already been pushed and discusses broader history-rewriting tools as dangerous for public/shared history. Git - Rewriting History

There is no independent benchmark or security audit available in the sources reviewed today. Same-day third-party coverage exists, but it mostly summarizes the original release; one AI-labeled commentary piece adds security framing but does not provide a reproducible evaluation. commit-rewriter nettoie ce que l'agent a écrit

What changed and event timeline

  1. A GitHub issue titled “First release to PyPI” was opened in the project

    In that issue, Willison wrote that he would “normally” release it as an alpha because it was “vibe-coded,” but had already used it for a real project: rewriting commits for recent Datasette security releases. This is maintainer-reported context, not independent verification of development methodology.

  2. Willison published the release note announcing commit-rewriter 0.1, describing it as a Python web app to help rewrite commit messages. The post says the tool was created to clean up Datasette security-release commits containing coding-agent artifacts and private issue references.

  3. GitHub shows a 0.1 release for simonw/commit-rewriter, with a verified GitHub-created signature on commit cff2b69, and release notes saying it starts a local web app for rewriting commit messages and defaults to port 8000.

  4. PyPI lists commit-rewriter version 0.1 as released on September 14, 2026, with Python requirement >=3.11, source and wheel distributions, Trusted Publishing enabled, and provenance pointing to the simonw/commit-rewriter repository at tag 0.1.

Capabilities and access

commit-rewriter 0.1 is a local web application, not a hosted SaaS service and not an AI model. The project depends on Starlette and Uvicorn, with Python >=3.11; its CLI entry point is commit-rewriter = "commit_rewriter:main".

Read the full section

commit-rewriter 0.1 is a local web application, not a hosted SaaS service and not an AI model. The documented access paths are uvx commit-rewriter /path/to/repository, pip install commit-rewriter, or uv tool install commit-rewriter. PyPI and GitHub both describe it as a local web app for editing commit messages in a Git repository. commit-rewriter · PyPI

The project depends on Starlette and Uvicorn, with Python >=3.11; its CLI entry point is commit-rewriter = "commit_rewriter:main". The default web server binds to 127.0.0.1 on port 8000, and the CLI supports -p/--port to choose another port. [](https://raw.githubusercontent.com/simonw/commit-rewriter/main/pyproject.toml)

The UI targets the latest 100 commits on main, showing editable messages, author/committer metadata, diffs, search by message/author/hash, an “edited only” filter, and a review dialog before applying changes. The interface also warns that drafts are stored in browser localStorage, descendant hashes change, invalidated signatures are removed, and no changes are pushed. [](https://raw.githubusercontent.com/simonw/commit-rewriter/main/commit_rewriter/index.html)

Exact model/version: none documented. There is no runtime LLM model dependency in the package metadata or source reviewed. The AI relevance comes from the stated use case—cleaning up coding-agent-generated commit messages—not from the tool calling an LLM. Release: commit-rewriter 0.1

Technical analysis for researchers and developers

The implementation is compact and direct. The central Repository class shells out to Git using subprocess.run, adding --no-replace-objects and -C <repo> to its Git invocations. Diffs are generated with git show --format=fuller --patch --binary --no-ext-diff --no-color, which means the UI can show Git’s own patch presentation rather than reconstructing diffs itself.

Read the full section

The implementation is compact and direct. The central Repository class shells out to Git using subprocess.run, adding --no-replace-objects and -C <repo> to its Git invocations. It verifies the repository by running git rev-parse --git-dir and then works against a hard-coded refs/heads/main. This hard-coded branch is already visible as a limitation: an open GitHub issue asks for support for repositories that do not have main or master. [](https://raw.githubusercontent.com/simonw/commit-rewriter/main/commit_rewriter/__init__.py)

Commit enumeration uses git log -100 --format=%H refs/heads/main, then reads each commit object with git cat-file commit <oid>. Messages are decoded using the commit’s declared encoding if present, defaulting to UTF-8. Diffs are generated with git show --format=fuller --patch --binary --no-ext-diff --no-color, which means the UI can show Git’s own patch presentation rather than reconstructing diffs itself. [](https://raw.githubusercontent.com/simonw/commit-rewriter/main/commit_rewriter/__init__.py)

Before rewriting, the tool checks that the expected branch tip is still current, rejects shallow repositories, refuses unmerged indexes, and refuses active Git operations including merge, cherry-pick, revert, rebase, bisect and sequencer states. It also checks for another worktree with main checked out. These checks matter because the tool performs low-level object creation and ref updates; concurrent Git operations would make state reconstruction riskier. [](https://raw.githubusercontent.com/simonw/commit-rewriter/main/commit_rewriter/__init__.py)

The rewrite algorithm is not a wrapper around git rebase -i. It computes affected commits with git rev-list --topo-order --reverse --parents <expected>, marks a commit affected if it is directly edited or descends from an affected parent, reconstructs raw commit objects, rewrites parent object IDs through an old-to-new mapping, and writes new commit objects with git hash-object -t commit -w --stdin. It then updates refs/heads/main with git update-ref, using the old expected tip as a compare-and-swap guard. [](https://raw.githubusercontent.com/simonw/commit-rewriter/main/commit_rewriter/__init__.py)

The code creates a backup branch named under commit-message-backup/<timestamp>-<random>, pointing to the original tip before rewriting. This supports rollback as long as the backup branch is retained. However, the tool does not push the backup or rewritten history to a remote; the UI explicitly says no changes are pushed. [](https://raw.githubusercontent.com/simonw/commit-rewriter/main/commit_rewriter/__init__.py)

The test suite provides the closest thing to reproducible evaluation found today. Tests cover preservation of author, committer, dates and trees; merge topology behavior; rejection of empty/NUL messages; stale-tip detection; preservation of uncommitted staged/unstaged/untracked changes; rejection of conflicts and active Git operations; failure handling; concurrent ref-change protection; the latest-100-commit window; HTTP validation, progress reporting, CSRF enforcement and trusted-host behavior; and explicit removal of invalidated commit signatures. [](https://raw.githubusercontent.com/simonw/commit-rewriter/main/tests/test_commit_rewriter.py)

From a reproducibility standpoint, PyPI provides source and wheel hashes and provenance attestations for both distributions. The source distribution is listed at 16.5 kB, the wheel at 12.7 kB, and PyPI records Trusted Publishing with GitHub Actions as the token issuer. These are supply-chain metadata, not a code audit, but they help practitioners pin and verify the initial artifact. commit-rewriter · PyPI

Claims and evidence

  • commit-rewriter 0.1 was released on September 14, 2026.
  • It is a Python local web app for rewriting Git commit messages.
  • It was motivated by cleaning AI-agent cruft and private issue IDs from Datasette security-release commits.
Read the full section
Material claimEvidence status
commit-rewriter 0.1 was released on September 14, 2026.Supported by maintainer announcement, GitHub release page and PyPI release metadata. Release: commit-rewriter 0.1
It is a Python local web app for rewriting Git commit messages.Supported by project README, PyPI description and source metadata. commit-rewriter · PyPI
It was motivated by cleaning AI-agent cruft and private issue IDs from Datasette security-release commits.Maintainer-reported in the release post and GitHub issue; not independently verified. Release: commit-rewriter 0.1
It creates a timestamped backup branch before rewriting.Supported by release post, README/PyPI, source code and tests. Release: commit-rewriter 0.1
It rewrites commits from the first edited commit through the branch tip, changing descendant hashes.Supported by release post, source implementation and UI warning; consistent with Git’s model of immutable commit objects and parent hashes. Release: commit-rewriter 0.1
It removes invalidated signatures.Supported by source comments, UI text and tests; no external audit found. [](https://raw.githubusercontent.com/simonw/commit-rewriter/main/commit_rewriter/__init__.py)
Independent evaluation exists.Not supported. Same-day summaries/commentary was found in the reviewed sources, but no hands-on independent audit or benchmark. commit-rewriter nettoie ce que l'agent a écrit

Context and prior work

Git history rewriting is a long-established workflow, usually performed with git commit --amend, interactive rebase, filter-branch, or newer tools. The distinctive contribution here is not a new Git primitive. GitHub documents branch protection rules that can restrict force pushes, require status checks and require signed commits.

Read the full section

Git history rewriting is a long-established workflow, usually performed with git commit --amend, interactive rebase, filter-branch, or newer tools. Git’s own book explains rewriting the most recent commit and changing older commit messages with interactive rebase, while warning not to amend commits that have already been pushed. Git - Rewriting History

The distinctive contribution here is not a new Git primitive. It is a purpose-built browser UI for one common post-agent cleanup task: rewriting many commit messages while preserving file contents and metadata. In that respect it resembles a narrow workflow tool rather than a general history surgery framework. The relevance to AI teams is that agentic coding makes messy metadata more common: commit messages may contain tool traces, private references, prompt artifacts or low-quality summaries that humans do not want in public release history. The release post’s Datasette example is evidence of that use case, but not evidence of broad prevalence. Release: commit-rewriter 0.1

Branch protection and signed-commit policies are the governance backdrop. GitHub documents branch protection rules that can restrict force pushes, require status checks and require signed commits. Those controls matter because rewritten local history only becomes a shared-history problem when pushed or force-pushed to a shared branch. About protected branches - GitHub Docs

Limitations, safety and contested findings

The biggest functional limitation is branch scope: version 0.1 targets refs/heads/main, and an open issue reports that the tool does not work for repositories without main or master. Tests assert that missing CSRF tokens are rejected and an unexpected host receives a 400.

Read the full section

The biggest functional limitation is branch scope: version 0.1 targets refs/heads/main, and an open issue reports that the tool does not work for repositories without main or master. [](https://raw.githubusercontent.com/simonw/commit-rewriter/main/commit_rewriter/__init__.py)

The biggest safety limitation is inherent to the task: rewriting commit messages creates new commit objects and changes descendant hashes. That is expected Git behavior, not a bug, but it can disrupt collaborators, invalidate references, and remove signatures if used on shared or signed history. Git’s documentation warns about rewriting published commits; the project UI also warns about changed descendant hashes and removed invalidated signatures. Git - Rewriting History

The HTTP surface is local by default and includes several protective measures: Uvicorn binds to 127.0.0.1, the app uses Starlette TrustedHostMiddleware for localhost-style hosts, and rewrite requests require an X-CSRF-Token. Tests assert that missing CSRF tokens are rejected and an unexpected host receives a 400. These are useful local-web-app safeguards, but not a substitute for sandboxing if an AI agent or untrusted local process can access the user’s browser/session or filesystem. [](https://raw.githubusercontent.com/simonw/commit-rewriter/main/commit_rewriter/__init__.py)

Same-day third-party commentary includes a French summary and an AI-labeled article framing the tool as an audit-trail risk. Those pieces are useful for context but do not independently verify implementation correctness or exploitation risk. The AGORÀ article itself discloses AI editorial authorship with human supervision. commit-rewriter nettoie ce que l'agent a écrit

Business and practitioner implications

For engineering managers, the tool is useful before publishing a previously private branch, especially for security releases where internal issue identifiers, exploit details, customer references or agent artifacts might leak through commit messages. The workflow should be treated as pre-publication cleanup, not routine post-publication editing. Release: commit-rewriter 0.1 For developers, the implementation is approachable and testable.

Read the full section

For engineering managers, the tool is useful before publishing a previously private branch, especially for security releases where internal issue identifiers, exploit details, customer references or agent artifacts might leak through commit messages. The workflow should be treated as pre-publication cleanup, not routine post-publication editing. Release: commit-rewriter 0.1

For regulated or security-sensitive teams, the governance rule should be simple: do not allow AI agents or broad local automation to rewrite release history without human review, external logging and branch protections. If commit signatures are part of your control environment, rewritten commits should be re-signed through the normal release process, and protected branches should restrict force pushes. GitHub’s branch protection documentation supports these controls at the repository policy layer. About protected branches - GitHub Docs

For developers, the implementation is approachable and testable. The most important operational precautions are: run it only on a full clone, review the backup branch, avoid shared branches unless the team has agreed to a rewrite, verify git diff <backup> main for content equivalence after rewriting, and push only after reviewing the resulting history. The project’s tests indicate content trees are intended to remain unchanged, but teams should still verify that property on their own repositories. [](https://raw.githubusercontent.com/simonw/commit-rewriter/main/tests/test_commit_rewriter.py)

Sources

Read the full section
FOLLOW THE EVIDENCE

The source trail.

Sources (11)
A LITTLE LESS NOISE. A LOT MORE CONTEXT.

Stay curious.
Follow the evidence.

Independent perspectives, the original sources, and room for the questions that don't have easy answers.

How we build the brief