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

# Troubleshooting

> Common Charter setup, workflow, and CI issues.

## “no .charter directory found”

Run `charter init` at the repository root, or use `charter --repo <path> ...` to point at the initialized repository.

## “resolving proposer/approver identity”

Configure Git identity:

```sh theme={null}
git config user.name "Your Name"
git config user.email "you@example.com"
```

Or supply `--by "Your Name"` for the command.

## “could not lock .charter/.lock … another charter process is writing”

Another `charter` command or MCP session is mid-mutation; writers wait up to 5 seconds, then give up. Retry in a moment. If no other process exists, a crashed one has already released the OS lock automatically — the file itself being present is harmless and never committed.

## “duplicate decision ids”

Two decision files claim the same `id`, so `Get`, supersede links, and `Governed-By` trailers would be ambiguous. `charter check` exits `3` and `charter sync` refuses until it is fixed: renumber or delete the extra file, then run `charter sync`. (Current versions allocate ids under a repository lock, so this state normally only arises from hand-edits or pre-fix history.)

## `charter check` exits `3`

The check could not run at all — bad `--diff` ref, unreadable or corrupt decision store, or missing `.charter`. Fix the underlying cause; CI must treat `3` as a failed job, never a pass. See [exit codes](https://shunya.mintlify.site/docs/reference/exit-codes.md).

## CI cannot find the base ref or commit messages

Use a full checkout history and a reachable base SHA/ref. In GitHub Actions, set `fetch-depth: 0`, then pass `github.event.pull_request.base.sha` to `--diff`.

## A blocking Decision only prints INFO locally

Expected behavior: without `--diff`, Charter compares working-tree changes with `HEAD` and has no commit messages to inspect. Commit the work with `Governed-By: <id>`, then run `charter check --diff <base>`.

## A Decision does not match

Check that it is `accepted`, that the file path is relative to the repository root, and that its `scope.paths` glob matches the path. For tags, provide `--diff`; tags are searched in the unified diff text, not file names.

## The MCP server corrupts an agent session

The MCP protocol uses stdout. Start it through the agent integration or ensure any wrapper writes diagnostics only to stderr. One server process is intended for one stdio session.

## The index is stale

Run `charter sync`. The Decision files are authoritative; do not edit `.charter/DECISIONS.md` by hand.

## An agent needs a new architectural choice

Have it search first, then draft a proposal with `decision_propose`. Keep acceptance, rejection, and merge approval in the human review workflow.


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