src/agents/) in the OpenClaw repo.
Type checking and linting
- Default local gate:
pnpm check(typecheck, lint, policy guards) - Build gate:
pnpm buildwhen the change can affect build output, packaging, or lazy-loading/module boundaries - Full pre-push gate:
pnpm build && pnpm check && pnpm check:test-types && pnpm test
Running Agent Runtime Tests
Run the agent runtime unit suites:agent-tools*, agent-settings, and
agent-tool-definition-adapter* suites.
Live tests are excluded from the unit config; run them through the live
wrapper (sets OPENCLAW_LIVE_TEST=1 and needs provider credentials):
Manual testing
- Run the Gateway in dev mode (skips channel connections via
OPENCLAW_SKIP_CHANNELS=1):pnpm gateway:dev - Trigger one agent turn through the Gateway:
pnpm openclaw agent --message "Hello" --thinking low - Use the TUI for interactive debugging:
pnpm tui
read or exec action so you can watch
tool streaming and payload handling.
Clean slate reset
State lives in the OpenClaw state directory:~/.openclaw by default, or
$OPENCLAW_STATE_DIR when set. Paths relative to that directory:
Delete those paths for a full reset. Narrower resets:
- Sessions only: do not delete
agents/<agentId>/agent/openclaw-agent.sqlite; session rows live there alongside other per-agent state. Use/newor/resetto start a fresh session for one chat, andopenclaw sessions cleanupfor session maintenance. - Keep auth: leave
agents/<agentId>/agent/openclaw-agent.sqliteandcredentials/in place.
auth-profiles.json files are no longer read at runtime;
openclaw doctor --fix imports them into the SQLite store.