
The Story of Submitting a Fix, Complete with Reproduction and Verification, to an OSS Project Where AI Writes and AI Reviews #OSSContribution
This page has been translated by machine translation. View original
Introduction
While using Beads together with Claude Code, I noticed that agents had started hesitating to perform git operations even in repositories I had not initialized with stealth. The cause was a bug where bd init --stealth wrote its setting to the user config. I filed an Issue and a fix PR, and it was merged. Even in a setting where AI wrote the fix and AI also did the review, what decided acceptance was the reproduction of the bug and the verification of the fix.
For people who use Beads, this article explains how to check for the problem and how to deal with it. For people who want to send fixes to OSS with AI agents, it also describes what I felt after actually doing so.
I have introduced how to use Beads in the following past articles.
What is Beads
Beads is an issue management tool for AI coding agents. It manages issues and dependencies with the bd command, and by injecting the output of bd prime into an agent's session, it lets the agent carry over the working context.
The bug and how to deal with it
bd init --stealth is an option that excludes Beads files from git tracking and initializes a repository without making it dirty. In a repository initialized with stealth, the setting no-git-ops: true is written, and bd prime instructs the agent not to perform git operations.
However, if you initialized when a user config file already existed and the repository-side config file did not yet exist, this setting was written to the user config. Because the user config is read by all repositories on the same machine, the same instruction appeared even in repositories not initialized with stealth. The execution of git commands itself is not blocked. It shows up as the agent refraining from git operations because it follows the instruction.
The cause was that the destination for saving the setting was the config file loaded at startup. At the time of initialization, the repository-side config file did not exist yet, so the destination remained the user config.
In the fix, I replaced the following single line so that the destination is explicitly the repository's .beads directory.
if stealth {
- if err := config.SaveConfigValue("no-git-ops", true, beadsDir); err != nil {
+ if err := config.SetYamlConfigInDir(beadsDir, "no-git-ops", "true"); err != nil {
fmt.Fprintf(os.Stderr, "Warning: failed to set no-git-ops in config: %v\n", err)
}
}
※The actual diff also includes a comment explaining the reason, but it is omitted here.
You can check whether you are affected by displaying the value in a repository that was not initialized with stealth. If true is returned, it may be leaking from the user config.
bd config get no-git-ops
grep -n no-git-ops ~/.config/bd/config.yaml
bd config show displays the source of each value, but in v1.1.2 on my machine, even a value that came from the user config was shown with the source (config.yaml), so it could not be distinguished from the repository-side config. For that reason, check the user config file directly with grep.
Delete any line you find with an editor. As the maintainers' review also pointed out, bd config unset no-git-ops edits the repository-side config, so it does not remove the line in the user config. For repositories that use stealth, it is also reassuring to confirm that .beads/config.yaml contains no-git-ops: true.
The fix was merged on November 2, 2026, but it is not included in the latest version at the time of writing, v1.3.2. Until a version containing the fix is released, be aware that initializing with stealth under the same conditions will write the setting again.
Contributing upstream
I reported the symptom and reproduction steps in Issue #7938 and sent the following PR.
I left the investigation, implementation, and drafting of the text to Claude Code. To show that the bug was real, I instructed Claude Code to thoroughly verify the facts. Specifically, I ran the downloaded official binary in an isolated environment to confirm the reproduction, and re-ran a test that fails before the fix and passes after it in a Linux container, following the maintainers' procedure. Also, because the explanation of the cause contained a part that asserted, without grounds, which commit introduced the bug, I had another model try to refute the plan and withdrew that part. The PR included the reproduction steps, the cause, and the test results before and after the fix.
The Beads maintainers operate a pipeline that processes PRs with a group of AI agents. On receiving the PR, the pipeline re-verified the bug and, separately from my PR, independently produced two fix proposals and compared them. The substance of the fix was the same in all three proposals, and the test was replaced with a version with better isolation. After that, an external reviewer ran the reproduction steps written in the Issue as they were, and confirmed that the bug appeared before the fix and did not appear after it. In the review, it was confirmed that the test fails when the fix is reverted and passes after the fix. Finally, it was merged after approval by a maintainer.
Lessons learned
This time, on my side Claude Code wrote the fix, and on the maintainers' side the pipeline independently produced the same fix and reviewed it. Since the AIs on both sides could produce the same fix code, what served as the basis for the decision was the evidence that the bug was real and that the fix resolves it. In a setting where AI writes and AI reviews, I felt that the most important job of the sender is to confirm the reproduction and verification yourself and attach them to the PR.
Finally
If you have used bd init --stealth, please check the no-git-ops line in your user config. If you create OSS fixes with AI agents, please confirm the reproduction and the before-and-after verification of the fix yourself, and send them attached to the PR. I thank the Beads maintainers for accepting the PR. I hope this article is helpful to those who use Beads and to those who want to contribute to OSS with AI.
