AI agents · · 5 min read
Claude Code Plan Mode: turn a bug report into a reviewable fix
A repository workflow with a copyable task brief, Plan Mode, project instructions, and a concrete review checklist.
By Sociologix Editorial

Use one bug as your first assignment
You do not need a collection of agent plugins to start getting useful work from Claude Code. Start with a bug you can reproduce in a repository you control. This walkthrough shows how to ask for a plan, inspect the proposed change, and evaluate the resulting patch. It is based on Anthropic's documentation checked on September 19, 2026; it is a suggested workflow, not a benchmark of a completed client project.
Our example is a contact form that accepts an email containing only spaces. A suitable result is specific: the server rejects the invalid value, the interface explains the problem, and valid submissions still work. That gives the agent a smaller target than "improve our website" and gives the reviewer something observable to check.
1. Start in the right checkout
Use a development checkout with the project's dependencies and normal test commands available. Record any existing failures before asking the agent to fix the new issue. If the repository already has unrelated edits, use a separate branch or worktree so the proposed patch stays easy to review.
From the project directory, launch Claude Code in Plan Mode. Anthropic documents this flag and the Shift+Tab mode switch. In this mode Claude investigates and proposes changes without editing source files. Read-only investigation can include shell commands; do not interpret the word "plan" as a guarantee that no command will run. [1][2]
cd /path/to/your-project
claude --permission-mode plan2. Give the agent a reproducible brief
Replace the example route and commands below with details from your application. Describe the observable defect, the intended behavior, and the boundary of the change. Ask for evidence from the repository before accepting an explanation. The prompt is a reusable starting point, not an instruction that overrides your organization's access policies.
Investigate the contact form's email validation.
Reproduction: submit an email value containing only spaces.
Expected: reject it on the server and show a useful field error.
Valid email submissions must continue to work.
Locate the form, request handler, validation, and existing tests.
Propose the smallest fix and the checks that would prove it.
Do not edit files yet. Identify assumptions and missing information.3. Put stable conventions in CLAUDE.md
Anthropic supports project instructions in CLAUDE.md, including build commands, architecture decisions, and conventions. Keep this file focused on information that will remain useful beyond today's bug. Use the actual commands from your repository, and remove obsolete directions when the project changes. [3]
For this example, useful instructions could say that server validation is authoritative, existing field-error components should be reused, and the relevant test suite must pass. Avoid filling the file with a long biography of the application. A reviewer should be able to scan it and understand the few decisions the agent needs to respect.
CLAUDE.md provides guidance to the model. It is not an access-control mechanism. Configure tool and path permissions separately; Anthropic explicitly distinguishes behavioral instructions from enforced permission rules. [2][3]
4. Review the plan before approving edits
A useful plan names the affected files, explains where whitespace reaches the handler, and identifies the behavior that should change. If it proposes replacing your form library, rebuilding authentication, or altering unrelated pages, narrow the task before proceeding.
Check whether the proposed test fails for the original defect. A test that merely repeats the new implementation does not demonstrate that the customer problem is fixed. For this example, ask for an invalid whitespace case, a valid address, and a request sent directly to the endpoint without the browser form.
After you approve the approach, let Claude implement the agreed scope using your normal permission settings. Review new permission requests on their actual operation; planning the task is not a reason to grant unrestricted access.
5. Inspect evidence, then decide whether to merge
Run the relevant checks and open the actual form. Compare the diff with the brief: confirm that errors are readable, accepted submissions retain their existing behavior, and no unrelated changes slipped in. Ask the agent to report commands run, their results, and anything it could not verify.
Save the useful task prompt and review checklist with your team's development notes. Once this small workflow is dependable, extend it to another bounded task, such as improving one API error path or documenting one integration. The outcome to optimize is a patch your team can understand and maintain.
Sources & further reading
Make AI coding useful in your repository.
Bring Sociologix a development bottleneck and your current delivery process. We can help configure a focused coding-agent workflow with review and verification built in.
Talk to Sociologix