> ## Documentation Index
> Fetch the complete documentation index at: https://loadwise.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# AI coding agents

> Use Loadwise with coding agents, after-edit hooks, MCP and a Git pre-commit hook.

Ask your coding agent to run Loadwise. On its first check or fix, the CLI gives a recognized agent the review workflow on stderr: a check lets the agent inspect every scoped finding, earlier edit, caller and test, and a fix request also lets it apply or adapt justified changes. The agent can read the full workflow with `loadwise agent instructions`. The first run works in a fresh checkout and leaves project instruction files and Git hooks alone.

Loadwise recognizes agent shell markers from Codex, Claude Code, Grok Build (formerly Cursor), Devin (formerly Windsurf), Cline, Roo Code, Aider, Gemini CLI and GitHub Copilot, as well as tools that identify themselves with `AI_AGENT`. An integration that supplies no marker can set `LOADWISE_AGENT=1` in its tool subprocess. Set `LOADWISE_AGENT=0` on a command to disable detection. Commands typed in plain Git Bash or an ordinary IDE terminal run normally. A shell opened inside an agent can inherit its markers.

## Set up a project

Install Loadwise in the project and run one command:

```sh theme={null}
npm install --save-dev loadwise
npx loadwise agent init
```

`agent init` updates the managed section of `AGENTS.md`, imports it from `CLAUDE.md` and enables history for manual CLI fixes too. From the installed package, so the version always matches, it also registers two integrations for each AI coding tool it supports:

* **After-edit hook**: every tool runs the same launcher, which walks up from the session folder to `node_modules/loadwise/agent/hooks/check-edited-file.mjs` and does nothing until Loadwise is installed. The script applies the same checks, deadline and feedback text for every tool; only the tool's payload and response envelope differ. See [the edit hook](#after-edit-hook).
* **MCP server**: the same local stdio server named `loadwise`. Project files hold `node` and a path relative to the project folder (`node_modules/loadwise/dist/bin/loadwise.js agent mcp`), so they can be committed and shared; the server starts in the project root. Grok Build expands `${workspaceFolder}` instead. Codex starts servers from its session folder, so its entry walks up from there to the installed Loadwise instead of naming a path. The Cline file is the one place that keeps absolute paths, because it lives in your home folder.

Claude Code is always configured, since `CLAUDE.md` imports the instructions. Another tool is configured when one of its detection paths exists, or when you name it with `--tools`. The command prints each file it writes and a summary of the tools it covered and the ones it did not detect.

| Tool (detected by, or `--tools`) | After-edit hook file | MCP file | Known tool-side limits |
| - | - | - | - |
| Claude Code (always) | `.claude/settings.json` `PostToolUse` | `.mcp.json` | Also read by Copilot, Grok Build and Devin, which is why duplicate runs are skipped. |
| GitHub Copilot: CLI, VS Code and cloud agent (`.github/copilot-instructions.md`, `.github/hooks`, `.github/copilot`, `copilot`) | `.github/hooks/loadwise.json` `postToolUse`, matcher `edit\|create` | `.mcp.json` for the CLI and VS Code (shared with Claude Code) | Feedback is capped at 10 KB. The cloud agent runs only the `bash` command, and does not read `.mcp.json`: its MCP servers are set in the repository settings (see below). `.vscode/mcp.json` is VS Code's deprecated format and is not written. |
| Gemini CLI (`.gemini`, `gemini`) | `.gemini/settings.json` `AfterTool` | `.gemini/settings.json` | Start it from the project root, where its hooks and MCP server run. It asks you to trust new project hooks. |
| Codex (`.codex`, `codex`) | `.codex/hooks.json` `PostToolUse` | `.codex/config.toml` | It asks you to trust new project hooks. Both its hook and its MCP entry find the install from any session folder. |
| Grok Build (`.cursor`, `cursor`) | `.cursor/hooks.json` `postToolUse`, matcher `Write` | `.cursor/mcp.json` | Whether every edit reports as `Write` is undocumented, and so is the path key inside `tool_input`; Loadwise accepts `file_path`, `path`, `filePath` and `target_file`. |
| Devin (`.devin`, `.windsurf`, `devin`) | `.devin/hooks.v1.json` `PostToolUse`, matcher `write\|edit\|apply_patch` | `.devin/mcp_config.json` | The path key in `tool_input` is undocumented; Loadwise accepts `file_path`, `path` and `filePath`, and reads file names from patch text. |
| Cline (`.clinerules`, `.cline`, `cline`) | `.cline/hooks/PostToolUse.sh` (CLI and SDK) and `.clinerules/hooks/PostToolUse` (VS Code extension) | `~/.cline/data/settings/cline_mcp_settings.json`, or `CLINE_MCP_SETTINGS_PATH` when it is an absolute path | Cline has no project-level MCP file, so Loadwise writes its user-level one only with `--global`. An existing `loadwise` entry that points at another project is kept with a warning; remove it and rerun to switch. The extension needs "Enable Hooks" and does not support Windows. A single-file `.clinerules` has no `hooks` folder, so the extension script is skipped with a warning. Windows cannot set the executable bit: `agent init` fixes it in the git index for a tracked script and otherwise prints `git add --chmod=+x <file>` to run once. Context is capped at 50,000 characters. |

The Copilot cloud agent takes its MCP servers from the repository settings on GitHub, not from a file in the project. A repository administrator opens Settings, then Copilot, then MCP servers, adds a configuration under "MCP configuration" and saves it. GitHub requires `tools` and `type` on each server. This configuration is shared by the cloud agent and Copilot code review, and `agent init` does not write it. The server only starts if Loadwise is installed in the environment the cloud agent runs in, for example by an `npm ci` step in `.github/workflows/copilot-setup-steps.yml`. GitHub does not document the folder the server starts in; the relative path below assumes the repository root:

```json theme={null}
{
  "mcpServers": {
    "loadwise": {
      "type": "local",
      "command": "node",
      "args": ["node_modules/loadwise/dist/bin/loadwise.js", "agent", "mcp"],
      "tools": ["loadwise_check", "loadwise_list_reports", "loadwise_read_report"]
    }
  }
}
```

Hook and MCP files in the project are written for every detected tool in the same run. Cline's global MCP file is written only with `--global`. `--mcp off` removes its `loadwise` entry with or without `--global`, and only when that entry points at this project.

When two tools read the same hook file (Claude Code's `.claude/settings.json` is read by Copilot, Grok Build and Devin), the hook script skips a second run for the same file content within 10 seconds, using a short-lived marker in a private per-user folder under the system temp folder. The run in the tool's own mode always wins: the Claude-mode run steps aside at once for a Copilot or Grok Build payload when that tool's own Loadwise hook file (`.github/hooks/loadwise.json` or `.cursor/hooks.json`) exists, answers it in Claude Code's format otherwise, and waits briefly when a native hook file exists, so the answer comes back in the format that tool reads. Set `LOADWISE_HOOK_DEDUPE_MS=0` to turn that off.

The command merges its entries into existing files and keeps every other setting. Rerunning it changes nothing when the entries are current. It leaves a JSON file that is not a valid object untouched with a warning, and a TOML file that already names `loadwise` outside its own `[mcp_servers.loadwise]` table, defines `mcp_servers` as an inline or dotted key, or writes a server table with an escaped quoted key. Without a local install it sets up only the instructions and explains how to add the rest.

```sh theme={null}
npx loadwise agent init --tools codex,gemini   # also configure tools without a project folder
npx loadwise agent init --global               # also write global-only MCP configuration
npx loadwise agent init --no-edit-hooks        # leave hook files alone
npx loadwise agent init --no-mcp               # leave MCP files alone
npx loadwise agent init --edit-hooks off       # remove only the Loadwise hooks
npx loadwise agent init --mcp off              # remove only the loadwise MCP server entries
```

Removal checks every project file `agent init` can write, and Cline's global file for an entry that points at this project. It also removes the `/loadwise` command that earlier versions wrote to `.claude/commands/loadwise.md` when it still carries its marker or description, and keeps a file you wrote. A Cline hook script is removed only when it carries the `loadwise:agent-hook` line. Removal works without Loadwise installed.

`agent init` takes these flags for the hooks and MCP servers. `--tools copilot,gemini,codex,cursor,devin,cline` also configures tools whose project folder does not exist yet, and `--global` also writes the Cline settings file in your home folder. `--no-edit-hooks` and `--no-mcp` leave those files alone, while `--edit-hooks off` and `--mcp off` remove only the Loadwise entries (`--edit-hooks on` and `--mcp on` are the defaults). `--mcp off` keeps the MCP file and its `mcpServers` object even when no other server is left, and keeps Codex's `.codex/config.toml` with its comments and other tables even when it ends up empty. A file that is not valid JSON, or whose `hooks` or `mcpServers` value has the wrong type, is left unchanged with a warning. Project MCP entries use `node` with a path relative to the project folder, so the files can be committed and shared.

Sources for each format: [Copilot hooks reference](https://docs.github.com/en/copilot/reference/hooks-reference), [VS Code hooks](https://code.visualstudio.com/docs/agent-customization/hooks), [Grok Build hooks](https://docs.grok.com/build/agents-window/hooks), [Devin CLI hooks](https://docs.devin.ai/cli/extensibility/hooks/overview) and [Devin Desktop hooks](https://docs.devin.ai/desktop/cascade/hooks), [Cline hooks for the CLI and SDK](https://github.com/cline/cline/blob/main/sdk/examples/hooks/README.md) and [for the VS Code extension](https://github.com/cline/cline/blob/main/.clinerules/hooks/README.md), and [Cline's user-level MCP file](https://github.com/cline/cline/issues/14121); [Claude Code hooks](https://code.claude.com/docs/en/hooks) and [MCP](https://code.claude.com/docs/en/mcp); [GitHub Copilot hooks](https://docs.github.com/en/copilot/reference/hooks-reference), [Copilot CLI MCP](https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/add-mcp-servers) and [VS Code MCP](https://code.visualstudio.com/docs/agents/reference/mcp-configuration); [Gemini CLI hooks](https://github.com/google-gemini/gemini-cli/blob/main/docs/hooks/reference.md), [tools](https://github.com/google-gemini/gemini-cli/blob/main/docs/tools/file-system.md) and [MCP](https://github.com/google-gemini/gemini-cli/blob/main/docs/tools/mcp-server.md); [Codex hooks](https://developers.openai.com/codex/hooks), [MCP](https://developers.openai.com/codex/mcp) and the [apply\_patch grammar](https://github.com/openai/codex/blob/main/codex-rs/apply-patch/src/parser.rs); [Grok Build hooks](https://cursor.com/docs/agent/hooks), [third-party hooks](https://docs.grok.com/build/agents-window/reference/third-party-hooks) and [MCP](https://cursor.com/docs/context/mcp); [Devin hooks](https://docs.devin.ai/cli/extensibility/hooks/overview), [lifecycle hooks](https://docs.devin.ai/cli/extensibility/hooks/lifecycle-hooks) and [MCP](https://docs.devin.ai/cli/extensibility/mcp/configuration); [Cline plugins](https://docs.cline.bot/sdk/plugins) and [MCP](https://docs.cline.bot/mcp/mcp-overview).

To start a shared rule policy, run `npx loadwise agent init --print-config` to preview a minimal configuration. Run `npx loadwise agent init --write-config` to save it when the project has no existing configuration. Both options leave instruction files and Git hooks alone. Loadwise also scans projects without a configuration file.

Agent-run CLI fixes save their actual edited hunks locally from the first fix. For earlier fixes and saved review decisions, run `loadwise agent history` from the checked project, optionally with a checker name such as `maintainability`. History stays under the user's local state directory and can include excerpts of project source. For unrecorded edits, including edits made on another machine, use an earlier report or a known diff.

If the storage base is a symbolic link or Windows junction, set the appropriate environment variable for the Loadwise command to a direct absolute directory outside the project. Use `LOCALAPPDATA` on Windows for the inbox, history and temporary handoffs. On macOS and Linux, use `XDG_STATE_HOME` for the inbox and history, and `TMPDIR` for a temporary handoff. Choose a directory that follows the same user ownership and permissions requirements as the default.

Agents check that every finding has a disposition with the original scan, the relevant history and the rescan. The outcomes file is an object with an `outcomes` array whose entries supply `checker`, `id`, `status` (`fixed`, `verified`, `intentional`, `false-positive` or `deferred`) and specific `evidence`. For a narrower request, provide only the authorized findings in those reports; put report files in a local scratch directory.

```sh theme={null}
npx loadwise agent verify --outcomes outcomes.json before.json history.json after.json
npx loadwise agent verify --save --outcomes outcomes.json before.json history.json after.json
```

Use the [outcomes JSON Schema](https://raw.githubusercontent.com/IbrahimHafez1/loadwise/main/schema/loadwise.outcomes.schema.json) to check the file structure in your editor or application. For a project with Loadwise installed, the schema is also available at `node_modules/loadwise/schema/loadwise.outcomes.schema.json`. The verifier checks evidence and accounting against the selected reports.

The first command checks coverage. `--save` also retains successful review decisions for the next session in a recognized agent session or an explicitly initialized checkout. A missing decision or skipped checker is reported as incomplete; a reasoned deferral counts as reviewed and stays visible as deferred. Code review and relevant tests establish whether a change works. For a standalone JSON scan, pass its checker, for example `--checker maint`: `perf` for performance and database reports, `rel` for reliability, migration and contract reports, `maint`, `sec` or `a11y`, one checker per invocation. Combined scans and history keep their original checker selection.

Use the handoff command printed by the fix run to preserve its scope. For a project-wide maintainability fix, save the manual findings with `npx loadwise fix --handoff maintainability > loadwise-manual.md`.

## Using Loadwise with an active coding agent

Ask the agent you are already working with to check the project with Loadwise. A shell-capable agent can run `npx loadwise check --json` and review the findings directly in the conversation. Ask it to verify findings against your code, suggest improvements, or implement the changes you choose. A check is read-only. A request to apply fixes can use `npx loadwise fix --yes --json` and review the actual edits and remaining findings in the same chat.

For an agent that uses Model Context Protocol (MCP), `npx loadwise agent init` registers the server for the tools in the [setup table](#set-up-a-project). For another MCP client, run `npx loadwise agent mcp --print-config` and register the printed command and arguments as a local stdio server named `loadwise`. The agent can call `loadwise_check` to run a fresh offline scan and read larger reports in pages with `loadwise_read_report`. Loadwise does not start a chat or send findings to another session.

Pass one of `uncommitted: true`, `staged: true`, or `changedSince: "origin/main"` to limit `loadwise_check` to changed lines. Set `workspace` to an array of package names or paths within the configured project to select workspace packages.

If you ran a terminal command yourself and want to share it later, use `npx loadwise check --review` or `npx loadwise fix --yes --review`. Paste the printed handoff into the chat you choose, or attach the report. `loadwise agent pending` and the MCP tool `loadwise_list_reports` list saved reports for that project.
Pass a saved report path from `loadwise agent pending` directly to `loadwise agent verify --outcomes outcomes.json <report-path>`.

## Generate a review prompt

Copy the output of this command into your coding agent. The prompt asks the agent to review changes since `origin/main` with the performance and reliability checkers by default.

```sh theme={null}
npx loadwise agent prompt --pr --report-fp
```

The prompt's `--report-fp` flag adds an instruction to ask for permission before preparing an anonymized false-positive report. To generate a GitHub issue link yourself, run `npx loadwise report-fp --rule <rule-id>`. Add `--open` to open the prefilled form in your browser. You submit the issue yourself.

## After-edit hook

After an agent edits a file, the hook runs the project's locally installed `loadwise` on that file: after `Edit`, `Write` or `MultiEdit` in Claude Code, `write_file` or `replace` in Gemini CLI, and every file a Codex `apply_patch` adds, updates or moves. The checks depend on the file:

* `.ts`, `.tsx`, `.js`, `.jsx`, `.mjs`, `.cjs`, `.mts` and `.cts` files: `perf`, `rel` and `sec` on the file, and `maint` on the uncommitted changes. `a11y` also runs on `.tsx` and `.jsx` files and on other script files that contain `@Component`.
* `.html`, `.htm`, `.vue` and `.svelte` files: `a11y` on the file.
* `.py`, `.go`, `.java`, `.cs` and `.rs` files: `perf polyglot`, `rel polyglot` and `sec polyglot` on the file.
* Dockerfiles, recognized by file name (`Dockerfile`, `<name>.Dockerfile` or `Dockerfile.<suffix>`, in any letter case): `sec dockerfile` on the file.
* `.sql` files in a `migrations` directory, or beside a Drizzle `meta/_journal.json`: `rel migrations` on the file. SQL files under `node_modules`, `dist`, `build`, `coverage`, `fixtures`, `__fixtures__`, `test`, `tests`, `__tests__` or a dot-directory are skipped.

In a workspace package with its own `package.json`, the hook also finds a Loadwise install hoisted to the workspace or git root, never above it, and runs the checks from the package folder.

The hook keeps only the findings for the edited file. Findings go back to the agent with their ids: as a blocking `reason` in Claude Code, as `additionalContext` in Gemini CLI, Codex, Copilot and Devin, as `additional_context` in Grok Build and as `context` or `contextModification` in Cline. Fixable findings from the JavaScript and TypeScript checks include `--fix --only <id>` commands; non-fixable findings and polyglot, migration and Dockerfile findings are listed as manual findings. A clean file prints nothing.

All checks for one hook run share one deadline of 20 seconds, and up to two checkers run at once. Set `LOADWISE_HOOK_TIMEOUT_MS` to a positive whole number of milliseconds to change the deadline; other values use the default. A checker that runs past its share of the deadline, or prints more than 16 MiB, is stopped along with the processes it started, and the other checkers can still report. The hook never downloads anything: without a local install, outside a project, on other file types, or when a run fails or times out before any checker reports, it exits silently; if a single checker errors or times out, the other checkers can still return partial feedback. To turn the hooks off, run `npx loadwise agent init --edit-hooks off`.

The Claude Code plugin that earlier releases offered through `/plugin install loadwise@loadwise` is removed. If you installed it, run `/plugin uninstall loadwise` in Claude Code and then `npx loadwise agent init`; until then `agent init` skips the Claude Code hook so edits are not checked twice.

To troubleshoot a quiet edit hook, set `LOADWISE_HOOK_DEBUG=1` in the environment that launches the agent. The hook writes short status messages to stderr for a missing local launcher, checker timeouts, invalid output and completed single-file scans with no findings. It keeps findings on stdout as before. Unset the variable to restore the quiet default.

## Git pre-commit hook

```sh theme={null}
npx loadwise agent init --hook block   # a commit with new findings fails
npx loadwise agent init --hook warn    # findings are printed, the commit goes through (also plain --hook)
npx loadwise agent init --hook off     # removes only this block
```

The hook runs `loadwise check --staged` from the project folder, so every tool that commits through git sees findings from the selected checkers on the staged lines. It writes a marked block into the hooks folder (honouring `core.hooksPath`) or into `.husky/pre-commit` when `.husky/` exists, appends to a hook you already have, and rerunning it replaces only its own block, including blocks written by earlier releases. With lefthook it edits nothing and prints the command to add. `git commit --no-verify` skips the hook.

### Linked Git worktrees

Git's default hooks directory is shared between linked worktrees. To change the hook for every checkout that inherits it, run the installer in the corresponding project in the primary checkout if its hooks directory is inside that checkout. A primary checkout created with an external `--separate-git-dir` can also refuse this operation.

Keep the hook manager's existing routing in managed checkouts. For installation with a detected Lefthook configuration, Loadwise prints the command to add to that configuration. Otherwise, when `.husky/` exists, the installer updates `.husky/pre-commit` even if a command temporarily overrides `core.hooksPath`.

For unmanaged Git hooks, prepare the replacement before changing Git's persistent settings.

1. From the linked checkout root, use `git rev-parse --git-path hooks` to identify the active hooks directory. Add `/.loadwise-hooks/` to your local Git excludes. Check that `git ls-files -- .loadwise-hooks` prints no paths and `git check-ignore -- .loadwise-hooks/` shows the directory is ignored. Prepare an operator-owned `.loadwise-hooks` directory there with trusted copies of every active hook and helper. Preserve executable permissions and keep the copies under your control. Changing `core.hooksPath` redirects every Git hook in that checkout.

2. From the project directory, run the installer with a temporary override. For example, in Git Bash or a POSIX shell with Loadwise installed locally:

   ```sh theme={null}
   GIT_CONFIG_COUNT=1 GIT_CONFIG_KEY_0=core.hooksPath GIT_CONFIG_VALUE_0=.loadwise-hooks npx --no loadwise agent init --hook block
   ```

   To remove Loadwise only from this checkout when it inherits a shared hook, use `--hook off` with the same temporary override on the copied hook set. A removal from the shared hook affects every checkout that inherits it.

3. Coordinate with the owners of the shared hooks to pause updates to hooks and helpers through verification and activation. Compare the final copies with the paused shared files, including executable permissions, and bring over changes while retaining your intended Loadwise block or removal. From the checkout root, run `git -c core.hooksPath=.loadwise-hooks hook run pre-commit` and verify the expected checks. Exercise the other active hooks with their normal checks. If you cannot coordinate the pause, keep inherited routing.

4. Check and record the repository setting with `git config --local --get extensions.worktreeConfig` before changing it. If the extension is off or absent, ask the repository owner to enable it following [Git's worktree configuration instructions](https://git-scm.com/docs/git-worktree#_configuration_file), and record any settings moved out of the common config. Use `git config --worktree` only after the extension is enabled. Before changing the linked checkout's routing, record its current `core.hooksPath` using `git config --worktree --get core.hooksPath`, including when no value is set. Then run `git config --worktree core.hooksPath .loadwise-hooks` in the linked checkout. Confirm the active directory with `git rev-parse --git-path hooks` and verify the active checks before shared updates resume.

The local copies are a snapshot. Bring over later changes to shared checks and their helpers, retain your intended Loadwise setting, and retest the hooks. Keep the directory ignored and untracked. Before checking out a different commit, require `git ls-tree -r --name-only --full-tree <commit> -- .loadwise-hooks` to succeed and print no paths for the exact commit you will check out. The check covers the checkout-root directory even from a nested project. If the command fails or lists a path, restore the prior hook routing before checkout.

Cleanup that removes ignored files can delete `.loadwise-hooks` while Git still points to it. Preview Git cleanup from the checkout root with `git clean -ndx`. If Git or another cleanup tool would remove the local hook copies, restore and verify the previous routing before cleanup. If the copies were already removed, restore and verify routing before committing.

To restore the linked checkout's previous hook routing, first confirm worktree-specific configuration is still enabled. If there was no prior local override, run `git config --worktree --unset core.hooksPath`. Otherwise restore the recorded value with `git config --worktree core.hooksPath <previous-path>`. Verify the resolved directory and rerun its checks before relying on the restored routing.

Restoring hook routing leaves the repository-wide `extensions.worktreeConfig` setting in place, including after an interruption. If you enabled it and need to undo that separately, have the repository owner check for `worktree` entries in `git config --show-scope --name-only --list` in every checkout while the extension is enabled. Coordinate with every affected worktree and use Git's worktree configuration instructions to restore any moved settings. Restore the original shared setting only when no checkout still depends on the extension. If it was absent, remove it with `git config --local --unset extensions.worktreeConfig`. If it was explicitly off, restore that value.

### pre-commit framework

For repositories using the Python [pre-commit framework](https://pre-commit.com/), add this entry to `.pre-commit-config.yaml`. Use the `v0.9.0` tag after it has been pushed. Until then, pin commit `b4f57b8c1ac938a9f757bf0ccb12d6e3f16303b8`, which contains the hook manifest.

```yaml theme={null}
repos:
  - repo: https://github.com/IbrahimHafez1/loadwise
    rev: v0.9.0
    hooks:
      - id: loadwise
```

Use pre-commit 3.2 or later and Node.js 22.13 or later on `PATH`. Install the published `loadwise` package as a dev dependency in the repository root's `node_modules`. The hook invokes that installation directly. The framework temporarily shelves unstaged edits, and Loadwise checks staged lines using the Git index.

If your repository has one checkout, uses Git's default hooks directory, and has no framework hook there, run `pre-commit install --hook-type pre-commit`. Linked worktrees share the default hooks directory. Coordinate any shared installation or removal with the other hook owners, or use the existing-hook approach below for a rollout by checkout.

If `git config --get core.hooksPath` returns a path, keep that setting. Have the hook owner add `pre-commit run --hook-stage pre-commit` to the existing hook or hook manager and propagate a failing exit status. If the existing command already runs the framework, verify that it selects Loadwise at the `pre-commit` stage. A command that selects only another hook needs a separate `pre-commit run loadwise --hook-stage pre-commit` step.

Keep an existing direct Loadwise check until the configured framework step runs Loadwise in that checkout. Then use the framework step alone to avoid scanning twice. For a shared hook, designate the participating checkouts and use `pre-commit run loadwise --hook-stage pre-commit` as their Loadwise step. Propagate its failure if the config is missing or no longer includes Loadwise at that stage. Keep the direct check in other checkouts that already use it.

To roll back a manually added framework step, restore the direct check in the hook you manage before removing the step or changing its configuration. To roll back a wrapper installed with `pre-commit install`, run `pre-commit uninstall --hook-type pre-commit` first. Then verify the restored hook still has the direct check, or restore it to the active hook before resuming commits.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.