hint: line that names the next command; try it first.
Install and setup
npx can't find the CLI by its short name
npx can't find the CLI by its short name
ancha on npm. With npx, use the full package name: npx -y @ancha-labs/cli@0.1.4 <command>. The short name works only after @ancha-labs/cli is installed globally (npm install -g @ancha-labs/cli) or in the project (npm install --save-dev @ancha-labs/cli). The instruction files ancha init writes say the same.doctor says: fail node: Node >=24 is required
doctor says: fail node: Node >=24 is required
node --version, then switch, for example with nvm install 24 && nvm use 24.CONFIG_INVALID: Ancha's SQLite module (better-sqlite3) has no native binary for this Node
CONFIG_INVALID: Ancha's SQLite module (better-sqlite3) has no native binary for this Node
npm install -g --allow-scripts=better-sqlite3,esbuild @ancha-labs/cli. For a project install, approve the scripts with npm install-scripts approve better-sqlite3 esbuild, then npm rebuild better-sqlite3.npm install fails building better-sqlite3
npm install fails building better-sqlite3
better-sqlite3, which downloads a prebuilt binary for your platform. Where none exists, npm builds it from source and needs a C/C++ toolchain: Xcode Command Line Tools on macOS, or build-essential and Python on Linux.error[USAGE]: no ancha.yaml here
error[USAGE]: no ancha.yaml here
ancha init in your agent’s project. It writes ancha.yaml with the start command it finds in package.json, a Procfile, pyproject.toml or the Dockerfile. When it finds none, pass --agent "<command>".The agent and the tools
error[USAGE]: no agent command to run
error[USAGE]: no agent command to run
ancha init found no start command in your project, so ancha.yaml has none. Set agent.command in ancha.yaml, or pass --agent "<command>".doctor warns: Successful native <tool> API access was not observed
doctor warns: Successful native <tool> API access was not observed
ancha connect <tool> --lang ts prints the settings. A clean exit or a healthy server does not count as access. The warning does not change doctor’s exit code.The agent can't find its API key or another variable
The agent can't find its API key or another variable
ancha run gives the agent a base set from your shell (PATH, HOME, locale and the like), Ancha’s variables and the tools’ variables, and nothing else. ancha explain says how many variables were withheld. Name the ones the agent needs under agent.pass_env in ancha.yaml, or pass --pass-env NAME for one run. --inherit-env passes everything, as 0.1.1 did, and prints a warning. See ancha run.The agent gets 401 or 404 from a tool
The agent gets 401 or 404 from a tool
Bearer for most tools, Token token= for PagerDuty, DD-API-KEY and DD-APPLICATION-KEY headers for Datadog, HTTP Basic for Gong and Jira, plus LinkedIn-Version and X-Restli-Protocol-Version for LinkedIn Ads. Use the full base URL from the environment; Slack’s ends in /api/. Each tool page has a working snippet, and ancha connect <tool> prints it.The agent calls an endpoint and gets unknown_method or HTTP 501
The agent calls an endpoint and gets unknown_method or HTTP 501
x-ancha-gap: 1 and a message that starts with ancha: not implemented:, and ancha run and ancha explain list it as a coverage gap. Check ancha twins coverage <tool> for a supported way to do the same thing. Do not rewrite working code to satisfy a replica that lacks an endpoint.Checks
A trace check fails although the agent made the call
A trace check fails although the agent made the call
* as the method when the HTTP verb does not matter; Slack’s SDKs call every method with POST, while plain fetch code often uses GET. ancha explain lists the calls the agent made.A slack.message check fails although the reply is there
A slack.message check fails although the reply is there
actual in ancha explain. It counts the bot’s messages in the channel and in the thread, which tells you whether the reply went to the wrong thread, the wrong channel or had the wrong text. in_thread_of counts replies only, not the parent message, and text_contains ignores case.A slack.message check passes when it should not
A slack.message check passes when it should not
from, a message from the starter history can satisfy the check. Set from: $bot, or the ref of the user your agent posts as.Judge checks are skipped
Judge checks are skipped
judge grading skipped with Judge skipped: OPENROUTER_API_KEY is not configured. Export OPENROUTER_API_KEY in the shell that runs ancha run or ancha check. A skipped check never passes, so a required one fails its trial; keep advisory rubrics out of pass.Runs
The trial says exit=timeout
The trial says exit=timeout
timeout and was stopped. The starter scene allows 10 seconds; the default for new scenes is 5 minutes. Raise timeout in the scene, or make the agent finish. ancha explain shows the end of its log.The run exits 3 or reports invalid trials
The run exits 3 or reports invalid trials
harnessIssues in the summary, fix the cause if it is local (ports, disk, Docker), and run again.--compare says regressed although the scene's pass rate did not drop
--compare says regressed although the scene's pass rate did not drop
dropped, and the run exits 1, even when another check improved and the scene’s rate held. Fix the dropped check, or save a new baseline if the drop is intended.--compare is refused
--compare is refused
--out for run, baseline and explain if you changed it.error[USAGE]: baseline "before" already exists
error[USAGE]: baseline "before" already exists
--force.error[USAGE]: this --idempotency-key was used for a different run
error[USAGE]: this --idempotency-key was used for a different run
explain, report or logs can't find the run
explain, report or logs can't find the run
latest points at the newest completed run in .ancha/runs. If you passed --out to ancha run, pass the same --out to explain, report, logs, status and wait.A long run ties up the terminal
A long run ties up the terminal
ancha run --detach --json and follow it with ancha logs <run-id> --follow, ancha status <run-id> or ancha wait <run-id>. Stopping logs or wait does not stop the run.Hosted workspace
error[USAGE]: hosted runs of your own agent are in private beta for this workspace
error[USAGE]: hosted runs of your own agent are in private beta for this workspace
ancha agent commands that reach the workspace are refused until your workspace has access. The hint says what to do: run ancha run on your computer, where your worlds and results still work, or request access at app.ancha.io/account under Hosted runs. The sample agent and its runs, worlds, sandboxes, scenarios, tools, secrets and runs from your computer against hosted worlds all work.The console says the hosted hours for this month are used up
The console says the hosted hours for this month are used up
this workspace's hosted hours for the month are used up. Runs on your computer are not limited, but a run whose worlds are in the workspace starts the machine and uses its hours: pass --local, or unset ANCHA_SERVER_URL and server.url, to keep the worlds on this computer.error[AUTH_INVALID]: ... rejected the API key, or needs an API key
error[AUTH_INVALID]: ... rejected the API key, or needs an API key
ancha login again, or set a current ANCHA_API_KEY from Settings. ancha whoami --verify tells you whether the server accepts the key you have.Commands fail with SERVER_UNREACHABLE
Commands fail with SERVER_UNREACHABLE
--server-url, server.url and ANCHA_SERVER_URL; ancha whoami shows the server commands use. A sleeping workspace wakes in seconds; retry.Commands use the hosted workspace when you wanted local
Commands use the hosted workspace when you wanted local
ancha run, ancha doctor and ancha world up put their worlds in the workspace only when --server-url, server.url in ancha.yaml or ANCHA_SERVER_URL names it; a saved login alone keeps the worlds on this computer. The first line of the run says running on hosted … when they went there. Pass --local to keep one command on this computer, or remove the setting; ancha whoami shows which one is in effect.The console says the workspace is starting
The console says the workspace is starting
error[USAGE]: secrets live in a hosted workspace
error[USAGE]: secrets live in a hosted workspace
ancha secrets needs a hosted server. Run ancha login, or set ANCHA_SERVER_URL and ANCHA_API_KEY. Export the variable before ancha secrets set NAME; the value comes from your shell.Live worlds and generated worlds
error[ENV_NOT_FOUND]: world <id> is gone
error[ENV_NOT_FOUND]: world <id> is gone
ancha world down removed it, or its local server stopped. Every ancha world and ancha check command, and every call from the agent, renews the lease (default 30 minutes; set --ttl). Start a new one with ancha world up --json, from the same directory you use for the other commands.error[USAGE]: world <id> has no checks to apply
error[USAGE]: world <id> has no checks to apply
--world <id>), which has no checks. Pass the file whose checks to apply: ancha check --env <id> --test <scene.yaml>.error[USAGE]: --on cloud needs a workspace
error[USAGE]: --on cloud needs a workspace
ancha world up --on cloud puts the world in your hosted workspace, so it needs one: run ancha login, or set ANCHA_SERVER_URL and ANCHA_API_KEY. Without --on, the world goes where ancha run would put it.error[CONFIG_INVALID]: world gen needs a model key
error[CONFIG_INVALID]: world gen needs a model key
ancha world gen calls a model through OpenRouter. Export OPENROUTER_API_KEY in the shell, then run the same command again. See ancha world gen.Playgrounds and containers
Install Docker or Colima to run contained agents.
Install Docker or Colima to run contained agents.
ancha execution doctor cannot reach a Docker engine. Start Docker Desktop, OrbStack or Colima, make sure the docker command is on your PATH, or set ANCHA_DOCKER_CONTEXT to the context to use.Set up the local execution runtime before starting a playground.
Set up the local execution runtime before starting a playground.
ancha execution prepare once in the project. It needs Docker with Compose and Python 3.12 or 3.13; set ANCHA_HARBOR_PYTHON to use another interpreter. Run it again after upgrading Ancha when ancha execution doctor --json reports worldImageReady: false.The agent profile says Host process · not contained
The agent profile says Host process · not contained
ancha agent add without --container-image saves a host-process profile. For playground runs, update it with ancha agent update <id> --container-image node:24-slim (or another image with your runtime), then ancha agent prepare <id>.CONFIG_INVALID mentioning Google Ads
CONFIG_INVALID mentioning Google Ads
ancha run as a local process.Still stuck
Email patrick@ancha.io with the command, its output andancha --version, or book a call. Never include API keys.