Debugging
Debugging
This page covers debugging helpers for streaming output, especially when a provider mixes reasoning into normal text.
Runtime debug overrides
Use /debug in chat to set runtime-only config overrides (memory, not disk).
/debug is disabled by default; enable with commands.debug: true.
This is handy when you need to toggle obscure settings without editing remoteclaw.json.
Examples:
/debug show/debug set messages.responsePrefix="[remoteclaw]"/debug unset messages.responsePrefix/debug reset/debug reset clears all overrides and returns to the on-disk config.
Gateway watch mode
For fast iteration, run the gateway under the file watcher:
pnpm gateway:watchThis maps to:
node --watch-path src --watch-path tsconfig.json --watch-path package.json --watch-preserve-output scripts/run-node.mjs gateway --forceAdd any gateway CLI flags after gateway:watch and they will be passed through
on each restart.
Dev profile + dev gateway (—dev)
Use the dev profile to isolate state and spin up a safe, disposable setup for
debugging. There are two --dev flags:
- Global
--dev(profile): isolates state under~/.remoteclaw-devand defaults the gateway port to19001(derived ports shift with it). gateway --dev: tells the Gateway to auto-create a default config + workspace when missing.
Recommended flow (dev profile + dev bootstrap):
pnpm gateway:devREMOTECLAW_PROFILE=dev remoteclaw tuiIf you don’t have a global install yet, run the CLI via pnpm remoteclaw ....
What this does:
-
Profile isolation (global
--dev)REMOTECLAW_PROFILE=devREMOTECLAW_STATE_DIR=~/.remoteclaw-devREMOTECLAW_CONFIG_PATH=~/.remoteclaw-dev/remoteclaw.jsonREMOTECLAW_GATEWAY_PORT=19001(browser/canvas shift accordingly)
-
Dev bootstrap (
gateway --dev)- Writes a minimal config if missing (
gateway.mode=local, bind loopback). - Sets
agent.workspaceto the dev workspace. - Creates the workspace directory if missing.
- Default identity: C3‑PO (protocol droid).
- Skips channel providers in dev mode (
REMOTECLAW_SKIP_CHANNELS=1).
- Writes a minimal config if missing (
Reset flow (fresh start):
pnpm gateway:dev:resetNote: --dev is a global profile flag and gets eaten by some runners.
If you need to spell it out, use the env var form:
REMOTECLAW_PROFILE=dev remoteclaw gateway --dev --reset--reset wipes config, credentials, sessions, and the dev workspace (using
trash, not rm), then recreates the default dev setup.
Tip: if a non‑dev gateway is already running (launchd/systemd), stop it first:
remoteclaw gateway stopRaw stream logging (RemoteClaw)
RemoteClaw can log the raw assistant stream before any filtering/formatting. This is the best way to see whether reasoning is arriving as plain text deltas (or as separate thinking blocks).
Enable it via CLI:
pnpm gateway:watch --raw-streamOptional path override:
pnpm gateway:watch --raw-stream --raw-stream-path ~/.remoteclaw/logs/raw-stream.jsonlEquivalent env vars:
REMOTECLAW_RAW_STREAM=1REMOTECLAW_RAW_STREAM_PATH=~/.remoteclaw/logs/raw-stream.jsonlDefault file:
~/.remoteclaw/logs/raw-stream.jsonl
Safety notes
- Raw stream logs can include full prompts, tool output, and user data.
- Keep logs local and delete them after debugging.
- If you share logs, scrub secrets and PII first.