Troubleshooting

Start with the short list. If your symptom is there, the fix is probably one step away. The deeper checks are grouped below.

Try this first

A quick map: the library is the Grimoire file; your app is the AI tool you use; the connector is the optional bridge between them.

Most first-run problems are one of these:

  1. The library file is missing. Download it from the releases page, or rebuild it from the project files.
  2. You are in the wrong folder. Run commands from the main project folder, not db/ or agents/.
  3. Your AI app points at the wrong file. It should start the connector's launcher, mcp-server/run.sh, not the Python file.
  4. A character cannot find the library. Check the lore/ link and that lore/db/grimoire.db exists.

If none of those fit, find your symptom below.

The library file is missing

You will see database not found, or a character will say it cannot read the library.

The library file is not included with the project. Download it from the releases page or build it:

curl -fsSL https://github.com/sagaciouszu/destiny-agent-grimoire/releases/latest/download/grimoire.db -o db/grimoire.db
python3 db/migrate.py

Do one or the other. If an earlier download left a partial file, delete db/grimoire.db first.

Python is missing or too old

Check what you have:

python3 --version

The search tool needs Python 3.8 or newer. On Debian or Ubuntu, sudo apt install python3 is usually enough. On macOS, use the python.org installer or Homebrew. On Windows, install from python.org and make sure the launcher adds Python to your PATH.

If you have several versions, python3 may point at an old one. Run the commands run the commands with the newer Python explicitly, for example python3.12 db/query.py stats.

The download is incomplete

The download was cut short or changed on the way. Delete it and try again; do not open or migrate a file that failed the check.

rm -f db/grimoire.db
curl -fsSL https://github.com/sagaciouszu/destiny-agent-grimoire/releases/latest/download/grimoire.db -o grimoire.db
curl -fsSL https://github.com/sagaciouszu/destiny-agent-grimoire/releases/latest/download/SHA256SUMS -o SHA256SUMS
grep '  grimoire.db$' SHA256SUMS | sha256sum -c -
mv grimoire.db db/grimoire.db

If it keeps failing, check your connection or proxy before assuming the release is wrong.

A character cannot find the library

A character project expects lore/ to point at a Grimoire folder, or to be a copy of it. If the link was moved or the folder renamed, recreate it:

./setup.sh /path/to/destiny-agent-grimoire

setup.sh removes a broken link and makes a new one. Keep the Grimoire outside the OpenCode agents folder; inside it, every lore file would be picked up as an agent.

A character is not listed

Run the sync again and look at what landed:

cd destiny-agent-grimoire
bash scripts/sync-live-agents.sh

You should see one <id>.md and one <id>-consult.md per character in ~/.config/opencode/agents/. The companion files should be inert, and the Grimoire should live outside that folder.

If the character appears but cannot be selected, check default_agent in ~/.config/opencode/opencode.json. Use the character id (for example drifter or mara-sov), not the file name with .md.

OpenCode lists too many characters

OpenCode treats every Markdown file under agents/ as a character, including files inside a linked folder. A Grimoire link inside that folder makes every lore card look like a character.

ls -la ~/.config/opencode/agents

If lore appears there, move it outside. Remove the shortcut if it is a link; move the folder if it is a real folder:

rm ~/.config/opencode/agents/lore
# or, when it is a real folder:
mv ~/.config/opencode/agents/lore ~/.config/opencode/lore

Then run the sync again and reload OpenCode. The sync also removes stray lore links and marks companion notes as inactive.

One character cannot ask another

A character asks another through a read-only helper copy, not through the main character. Main characters cannot be started as helpers.

Check that the series list has both main agents and that the consult files were installed. A helper copy is read-only on purpose: it cannot run commands or pass the question on. That is expected, not a bug.

The AI connection is not showing up

Install the connector, then register the path it prints. In the Grimoire folder:

bash mcp-server/install.sh

From a character project, the same installer is under lore/:

bash lore/mcp-server/install.sh

Your app should start mcp-server/run.sh (or lore/mcp-server/run.sh from a character project), not server.py. Use the full path if the app does not start in the project folder. The connector uses a direct local connection; an app that expects a web address needs a local bridge.

The AI connection will not start

Most of these are setup problems, not library problems.

  • The local setup is missing. Run bash mcp-server/install.sh again; it creates the setup and installs the required packages.
  • The path is wrong. Point your app at the full path to mcp-server/run.sh, not at the folder.
  • The library file is missing. The connector needs db/grimoire.db; run the install page first.
  • The app expects a web address. This connector uses a direct local connection. Use a local bridge, or an app that can start a local helper.

You can test the connector by hand from the main project folder:

mcp-server/.venv/bin/python tests/mcp-test.py
The quote checker says no

The quote checker is strict about what counts as a line in this library. Common causes:

  • It is a paraphrase. Reword it as your own words, or find the real line.
  • The speaker is wrong or too vague. Use the full speaker name and exact mode.
  • Hidden characters came along for the ride. They are cleaned up before comparison, but copied text can still differ from the source.
  • The library is out of date. Rebuild it and try again.

If it still fails, do not present the line as a verified quote.

A character cannot read the library

The character files can work without the library, but lookup and quote checks cannot. If a character suddenly stops citing anything:

  • Check lore/db/grimoire.db exists.
  • Check lore/ points at a real Grimoire folder.
  • Run ./setup.sh from the character project.
  • Confirm your app starts in the project folder; the helper scripts find their files from their own location.

A helper copy has no command line on purpose. It relies on the AI connection for lookup; without it, expect a shorter, less grounded answer.

Still stuck #