Local AI-powered C++ code reviews for Visual Studio, using the Codex CLI installed and authenticated on your workstation.
Overview
CPP Guardian brings Codex-powered C++ code reviews directly into Visual Studio.
The extension uses the Codex CLI installed on the developer’s workstation—without a CPP Guardian backend, separate API key, or source-code upload to a service operated by CPP Guardian.
Review modes
Review Branch Change
Reviews committed changes between the current branch and its detected parent branch.
Review Current Changes
Reviews staged, unstaged, and untracked changes before commit.
Review Current File
Reviews the active source file and, when available, its matching C++ header or implementation file.
Context-aware reviews
Codex can inspect related declarations, callers, contracts, and repository files to understand the impact of a change.
Reviews focus on actionable defects such as:
- incorrect behavior and regressions;
- crashes and memory-lifetime issues;
- concurrency problems;
- broken API contracts;
- compilation and portability risks;
- missing validation and unsafe edge cases.
Findings are prioritized from P0 to P3 and displayed with clickable source locations.
Local and read-only execution
CPP Guardian launches Codex in an ephemeral, read-only environment:
- no source files are modified;
- no build or test is launched automatically;
- no CPP Guardian backend is used;
- no anonymous installation identifier or guest quota is created;
- authentication and usage limits come from the user’s existing Codex account.
Git branch detection
For branch reviews, CPP Guardian:
- uses
git config cppguardian.baseBranchwhen configured; - otherwise prioritizes the remote default branch and common integration branches such as
develop,main, andrelease/*; - uses the Git graph as a fallback.
The detected context is displayed in the review:
Current: feature/my-change | Parent: develop
