Overview
Use Claude Code in the Claude desktop app to draft a kernel memory-management change with tests and notes, then review every shared-state access for races before the patch goes to normal review.
Problem or Objective
More in Coding and Code Review
AI Agents and Models
Tools and Integrations
- Tools
- Claude Desktop · Claude Code
- Prerequisites
- A paid Claude plan for Claude Code in the desktop app, a kernel source tree and a test machine or VM.
How It Works
Open your kernel tree in Claude Code inside the Claude desktop app. Ask Claude to draft the change, the tests and a short note on the design, and keep each step small enough to read in one sitting. Then start a separate review pass: ask Claude to list every lock, atomic operation and piece of shared state the patch touches, and for each one the paths that could run at the same time. Do not accept that list as proof. Check it against the code yourself, run your usual concurrency and stress testing on a test machine, and run benchmarks separately. Send the patch through the normal mailing-list review, with the testing you did described plainly.
Implementation Workflow
Steps assembled from the agents, tools and prompt of this entry. Adapt them to your own setup.
- Choose the agentSet up Claude Desktop.
- Connect the toolsConnect the tools this workflow relies on: Claude Desktop, Claude Code.
- Check the prerequisitesA paid Claude plan for Claude Code in the desktop app, a kernel source tree and a test machine or VM.
- Gather your detailsCollect what the prompt asks for: Patch file or branch, Kernel subsystem, Your test machine or VM.
- Run the starter promptPaste the starter prompt below into Claude Desktop and adapt it to your case.
- Check against the documentationCompare what you get with the documentation at claude.com before you rely on it.
Practical Starter Prompt: List the concurrency risks in this patch
Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].
Review the change in [Patch file or branch] for the [Kernel subsystem] subsystem. List every lock, atomic operation, per-CPU variable and other shared state the patch reads or writes. For each one, describe which code paths could run at the same time, what ordering the patch assumes, and how it could fail if that assumption is wrong. Mark anything you are unsure about as unverified. Suggest stress tests for [Your test machine or VM]. Do not change any code; this is a review only.Treat the list as a starting point. Check each item against the code yourself and run your own stress tests before sending the patch for review.
Expected Results and Benefits
This is a suggested workflow, not a reported result. The points below are what the cited documentation says the tools can do.
This is a suggested workflow, not a reported outcome. Anthropic's pages say Claude Code runs directly in the desktop app, where you can review local code changes, and that the app works with your local development environment and files. They say nothing about kernel development or about finding race conditions, so the review pass is a checklist aid, not a guarantee.
Limitations and Considerations
An AI review of its own code can miss races that only show up under load, so concurrency safety needs your own analysis and stress testing. Claude Code in the desktop app needs a paid plan. Check your project's rules on AI-assisted patches before you submit, and say how the patch was tested. Results depend on your setup and were not independently reproduced by Top 200 Repos.
Sources
- Download Claude | Claude by Anthropic (opens in a new tab)
Project documentation · claude.com · Undated · Source checked 26 Nov 2026, 17:27 UTC
What this source supports
- Claude Code runs directly in the desktop app; you can preview running servers, review local code changes, and monitor pull request status without leaving the app.
- Access your local dev environment or files.
- Install Claude Desktop | Claude Help Center (opens in a new tab)
Project documentation · support.claude.com · Undated · Source checked 26 Nov 2026, 17:27 UTC
What this source supports
- Claude Desktop is available on macOS, Windows, and Linux (beta); what you can do depends on your plan, with Claude Code on the Pro, Max, Ultra, Team and Enterprise plans.