Troubleshooting

Every error is a JSON object with a code and a message. These are the codes you are most likely to see, and what to do about each.

Reading errors

{"error":{"code":"session_not_found","message":"No session named 's1'. Start one with: ..."}}

Exit code 1 means an error; exit code 2 means the agent or language selection of init was invalid or ambiguous. bellatrix help lists every command's flags. Set BELLATRIX_TRACE=<file> to record every call the agent made.

driver_unreachable

  • Desktop / mobile: WinAppDriver or Appium is not running at the URL the CLI used (default http://127.0.0.1:4723 for both). Start it, or point the CLI elsewhere (McpSettings__ServerUrl, --appium-url). The CLI never starts it for you.
  • Web: a session started without --remote-url has a local driver that close-session stops; after that, start a new session. With --remote-url, check that your Selenium server is up.

session_not_found

Sessions are stored per folder in .bellatrix/sessions.db and per domain. Run every command of one test from the same folder, use the same --session name, and use the domain the session was started in. bellatrix sessions --json lists what is stored; bellatrix sessions --prune --json removes stale entries.

init exits with code 2

init found no AI agent (or several) in the repository and will not guess. Pass --agent explicitly, for example --agent claude or --agent claude,cursor. Exit code 2 also means several languages were detected: pass --language.

Skills missing or listed twice

  • Run bellatrix init --dry-run --json to see where each file goes and which shared folders were reused.
  • A file you edited is skipped and reported; pass --regenerate to overwrite it.
  • With Claude Code plus Codex CLI, Gemini CLI or Antigravity CLI, Copilot, Cursor and OpenCode read both .claude/skills and .agents/skills and may list each skill twice. No layout avoids that; the run reports it as a warning.

The agent reads whole UI trees

If the agent calls snapshot --inline or get-page-source, or opens snapshot files, remind it of the scaffolded rule: delegate to bellatrix-<domain>-locator-specialist, or query with bellatrix <domain> find --snapshot <path>. With BELLATRIX_TRACE set, such calls are marked "contextHeavy": true in the trace.