-
Notifications
You must be signed in to change notification settings - Fork 3
Troubleshooting
dotagent doctorChecks Python version, git presence, ANTHROPIC_API_KEY, .agent/ state,
configured sources, hooks installed, episodic index health, cache gitignore,
optional-extras availability. Exits nonzero on any fail. Output is
designed to be paste-able into an issue.
For more detail:
DOTAGENT_DEBUG=1 dotagent <whatever> # surface silenced exceptions on stderrThe auto-reindex only fires when dotagent observe sees a docs/*.md
change (i.e. when you commit or when Claude Code's post-tool hook fires).
Manual edits without committing won't trigger it.
Fix:
dotagent sync # re-indexes + re-renders
# or just the reindex:
dotagent reindexThe SQLite event index may be missing or stale.
dotagent reindex-events # rebuild from JSONL
dotagent who --file <path>That's expected when the key isn't in the environment. Either:
export ANTHROPIC_API_KEY=sk-ant-...
dotagent skill run plan --task "..."Or run dry to inspect the prompt without making an API call:
dotagent skill run plan --task "..." --dry-run
# prints the resolved system + user promptsVerify the hook exists and is executable:
ls -la .git/hooks/prepare-commit-msg
# should be -rwxr-xr-x ... and contain `dotagent`
# if missing:
dotagent sync # reinstalls hooksNote: trailers are added to new commits via prepare-commit-msg. They
don't get backfilled into existing commits.
The watcher uses pgrep -f cursor as a heuristic: if any Cursor process
is running, file edits in the watched repo are tagged tool=cursor.
This catches the common case but isn't perfect — if you're typing in vim
while Cursor is also open in the background, your edits get tagged
tool=cursor.
Fix: close Cursor when you're not using it, or rely on Cursor 0.40+'s native hooks (drop the watcher entirely).
Your repo doesn't match the Claude-Code-Optimization layout exactly. To
wire it manually, edit .agent/config.yaml:
sources:
bug_registry: docs/whatever-you-call-it.md
anti_patterns: docs/your-anti-patterns.md
# ...Then dotagent reindex && dotagent sync.
Your local git auth isn't configured or doesn't have access to the repo. If it's a private repo, generate a personal access token and:
pipx install "git+https://<token>@github.com/dilawarabbas1/dotagent"Reduce the embedded entries via .agent/config.yaml:
context:
bug_registry_top_n: 8 # was 15
anti_patterns_top_n: 5 # was 10
recent_activity_top_n: 4 # was 8dotagent sync regenerates with fewer entries. The full docs/ remain
linked in the source-pointer footer, so the AI agent can fetch detail
on demand.
Set DOTAGENT_DEBUG=1 on the server host and rerun — it'll print the
traceback. Most likely cause: malformed JSON in the request body, or a
token without writer+ role.
The first run downloads all-MiniLM-L6-v2 (~22MB) which can be slow on
flaky connections. Subsequent runs use the cached model.
If you don't want embeddings: dotagent dream run --no-embeddings (the
heuristic clusters still run).
Your active actor is wrong. Run:
dotagent identity showFix:
dotagent identity set --id <your-id> --name "..." --email "..."
dotagent syncThe personal section reads from
.agent/memory/personal/<resolved-actor>/profile.yaml — if the resolved
actor was wrong, you got someone else's prefs.
Two common causes:
-
Optional extras missing. CI installs
[dev,server]by default. If a test imports from[ml]or[watch], gate it withpytest.importorskipor@pytest.mark.skipif. -
Working directory.
find_repo_root()walks up looking for.git/or.agent/. Tests must usetmp_pathand not assume CWD.
Each warn includes a fix: line telling you exactly what to run. The
common ones:
| Warning | Fix |
|---|---|
sources: No sources configured |
Edit .agent/config.yaml to point at your docs |
sources: 0/N configured sources exist on disk |
Create at least one docs/*.md or change the config paths |
hooks: git hooks missing dotagent wiring |
dotagent sync |
hooks: Claude Code post-tool hook is missing |
dotagent sync |
episodic_index: JSONL files exist but no SQLite index |
dotagent reindex-events |
cache_gitignore: missing |
dotagent reindex (regenerates the .gitignore) |
dotagent --version
python --version
dotagent doctor --format json…paste those in an issue along with the minimum command sequence that reproduces the problem. If it's a docs-parsing issue, also attach the docs/*.md file in question (sanitize if needed).
Repo · Issues · Changelog · License: MIT