agentleFS
pankaj-mahaurpankaj-mahaur/Agent-Daemon/skills/daemon/harness-troubleshoot/SKILL.md

harness-troubleshoot

Skill0 starsChanged 7 days agoMITView on GitHub

Use when agent-daemon's harness misbehaves — `ad tui` / `ad run` / `ad loop` / `ad chat` fails, hangs, says \"Not logged in\", \"needs its key again\", \"Access is denied\", \"spawn EPERM\", \"engine stopped\", \"Fallback paused\", hooks don't fire, memory isn't injected, or \"ad run kaam nahi kar raha\" / \"harness toot gaya\". Checks login → sandbox → hooks → the engine's own log, with known causes for Windows, ad tui, accounts, fallback, workers and ad state.

  • Installs packages

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If an error says "The engine reported a problem", open /warnings in the TUI or read the details: lines in CLI output for the engine's …

    line 16
  2. Very specific:

    Read the engine's log: when the output doesn't explain it.

    line 39
  3. Very specific:

    Never print auth.json or tokens.

    line 48

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Troubleshoot the ad harness

The harness drives the engine's app-server in its own home (~/.agent-daemon/engine). Most failures are one of four things: login, sandbox, hooks, or an engine error that only shows up in the engine's own log. Check them in that order. Don't guess from the agent's chat output.

If an error says "The engine reported a problem", open /warnings in the TUI or read the details: lines in CLI output for the engine's original text. ad doctor shows its tested version.

Version probes must capture child stderr explicitly: Node's execFileSync echoes it when stdio is omitted. Doctor retains probe stderr as labelled details, and live checks must preserve engine error codes/raw fields for the façade's mapping.

Each row below names its entry in docs/troubleshooting.md (#N) where the full text is.

When to use

Any harness command errors out, hangs, or finishes without doing the work ("my shell was denied", "couldn't run the tests").

Procedure

  1. Login. ad auth status (what ad uses now, and whether each account works). Not logged in → ad auth login <provider> (openai, openrouter, chatgpt, …; ad auth login --help lists them). An account that "needs its key again" → the command it prints. The harness login is separate from your own install's login.
  2. Engine + hooks. ad doctor. Look at the engine lines:
    • the engine version should equal the pin in runtime/package.json; if it doesn't, cd runtime && npm install.
    • Engine hooks: k/N trusted with k < N → the next ad run re-trusts them; if it stays low, the hook commands changed (re-run ad run once, then check again). The row names the hooks the engine skips until trusted. After an upgrade the hooks file is regenerated at the next start; hooks written for older ad keep working.
    • The hook rows (every hook runs the dispatcher, runtime/bin/hook.mjs <event>): Hook routes (a step run twice), Hook script (gone, or in a temporary copy), Rules file, Memory plugin hooks, the rules check's mode, and Hook log (the last lines of ~/.agent-daemon/hooks/hook.log: what a hook couldn't do, which no host shows).
  3. Sandbox (Windows). ad sandbox status. Not ready → ad sandbox setup. Unattended runs (ad loop, workers, schedules) refuse to start without it.
  4. Reproduce small, in a scratch dir and never the user's repo, so test prompts don't land in its memory:
    mkdir <scratch>/probe && cd <scratch>/probe && git init -q
    ad run "Run: node --version. Report the output." --json
  5. Read the engine's log when the output doesn't explain it. It's logs_2.sqlite in the harness home, table logs (columns id, level, target, feedback_log_body). sqlite3 may not be installed; use Node:
    cd ~/.agent-daemon/engine
    node --experimental-sqlite --no-warnings -e '
    const { DatabaseSync } = require("node:sqlite");
    const db = new DatabaseSync("logs_2.sqlite", { readOnly: true });
    for (const r of db.prepare("select id, level, target, feedback_log_body b from logs where level in (?, ?) order by id desc limit 10").all("ERROR", "WARN"))
     console.log(r.id, r.level, r.target, "::", r.b.slice(r.b.lastIndexOf("}:") + 2, r.b.lastIndexOf("}:") + 500));'
    Never print auth.json or tokens.
  6. Match it to a known cause (below), fix, and re-run step 4. For a run that used several accounts, ad sessions show --last says which target ran each turn and why a turn failed.

Known causes

Symptom / log lineCauseFix
CreateProcessAsUserW failed: 5 (Access is denied.) or -1073283067 for a pwsh.exe under ...\WindowsApps\... (every command then asks to run outside the sandbox) (#16)PowerShell 7 from the Microsoft Store: the sandbox can't start a Store (MSIX) app. 2.0.1 dropped only the alias folder from the engine's PATH; started from Store PowerShell 7, its package folder C:\Program Files\WindowsApps\Microsoft.PowerShell_… still came firstupgrade to agent-daemon ≥ 2.1.1 (withoutStoreAliases drops every WindowsApps entry); to reproduce, run the harness from that PowerShell with a temp AD_ENGINE_DIR and a SHELL prompt against the mock model
every command is rejected at once (CreateProcess Rejected) on Windows, with no approval askedwith approvals off (approval_policy = never: loops, workers, side conversations) and no Windows sandbox set up, the engine (0.163) rejects commands instead of askingad sandbox setup (#15)
agent-daemon-memory: Allow the agent-daemon-memory MCP server to run tool "memory_search"? on every recallbefore 2.1.1 the memory server kept the engine's default approval mode, or the user set promptupgrade (setup sets default_tools_approval_mode = "approve" unless the user chose a mode); valid modes: auto, prompt, writes, approve
the first command or edit after installing sits on "Thinking" for ~35 s (Windows)the engine sets up its sandbox for the harness home on the first sandboxed action, oncenothing to do (#29)
spawn EPERM from node --test, npm scripts or anything that starts child processes (#17)the unelevated Windows sandbox blocks Node child processesrun test files directly (node x.test.js), or try ad sandbox setup --elevated (untested)
Windows sandbox is …; unattended runs need it (#15)sandbox not set upad sandbox setup
the engine is version X; ad was tested with Ythe installed engine isn't the pinned onecd runtime && npm install
hooks never fire / no memory injectedhooks untrusted, or features.hooks off for that threadad doctor; unattended threads only switch off non-memory MCP servers, not hooks
every Claude Code hook fails; doctor Hook script … is gone (#97)ad init ran from a copy of ad that was removed (an npx cache, a temp folder, a worktree)ad init from the ad the user keeps
notes shown twice; doctor Hook routes … run twice (#96) or Memory plugin hooks … predates (#98)an older ad hook … entry next to a dispatcher route, ad's hooks in a project's settings too, or a pre-dispatcher memory plugin next to exec-form routesad init (one route per step; writes the older plugin's form while it is on); remove ad's entries from project settings by hand
ad: the rules file is unreadable… (#95)~/.agent-daemon/guards.json damaged; the check falls back to guards.last-good.json, else no rulesmove the broken file aside; never edit it to "unblock" a tool
hook log: the memory store is schema vN, older/newer than this ad's (#99)hooks never upgrade the store: older → a background upgrade, captures wait in the journal; newer → an older ad runs the hooksolder: wait for the next session, or run any ad memory command; newer: update the ad that Hook script names
ad digest-latest finds no harness sessionit only searches ~/.claude/projectsad digest --transcript ~/.agent-daemon/engine/sessions/<…>/rollout-*.jsonl --cwd <project>
ad loop stops right away (#18)a STOP file exists, or a budget is too smallremove .agent-daemon/STOP; raise --max-*
ad won't run the engine in your own install's home (or trailing dot or space, network (UNC) paths) (#19)AD_ENGINE_DIR (or CODEX_HOME) points at the user's own ~/.codex, or a path leading thereunset it or point it at a new folder; never "fix" the guard
engine not installed — run: cd runtime && npm install (#20)the pinned engine is missing; ad never falls back to the user's own installre-run the installer or cd runtime && npm install
401 Unauthorized on plugins/featured in the logthe engine warming its plugin listharmless, ignore
Shell snapshot not supported yet for PowerShell (WARN)engine feature not available on Windows shellsharmless, ignore
"Pick a project folder" / HOME_FOLDER_REFUSED / "Run this in a project folder" (#48)the folder (home, or under a git home) would load the user's own ~/.codex as a project layer: skills even untrusted, settings when trusted (homeLayerRisk, engine/codex/home.mjs); resume/fork are checked against the thread's stored folderopen a project folder; overrides --allow-home-folder, AD_ALLOW_HOME_FOLDER=1, pref allowHomeFolder; jobs that already ran there are grandfathered and listed by doctor
ad migrate: "an ad session is running (pid N; engine pid M)" (#38)every engine holds a lease in ~/.agent-daemon/locks (engine-*.lock, kind engine) from start to exit; a holder that is gone with its engine still running keeps it held; dead leases are swept by the next migrateclose that session, or end the engine pid; never delete live lock files by hand

Memory

SymptomCauseFix
memory tools answer "isn't bound to a project" (#44)the server binds at start to one project (--project, AD_MEMORY_PROJECT from ad's façade, CLAUDE_PROJECT_DIR only with --host claude-code, else a git/.agent-daemon working folder); home, roots, system folders, ad's own folders and the install folder never countopen the project folder; Claude Code: --host claude-code; other hosts: --project <folder>. ad's engine starts one server per conversation in its folder (and the façade passes AD_MEMORY_PROJECT); a GUI app's fixed launch folder never binds
a memory result shows [withheld: this note reads like an instruction…]memory/render-safe.mjs withholds a stored note that reads like an injection or a command it tells the agent to run (3.0 stored some before its screen)by design; ad memory held reviews held notes, and ad memory scan holds such old notes back once
a learning is missing from memory (#45)agent-origin notes are pending, injection/secret hits quarantined, 3.0 global rows serve only in their session's project, user facts only where observedby design; the user can restate it or /remember it
doctor: older rows "can't be told apart" (#46)two paths mapped to one project_slug (/x/a/b, /x/a-b); projects now have ids, and rows with no session or folder to tie them reach neitherad memory assign --list, then ad memory assign learnings:<id> --project <folder> in the user's own terminal
a record tool says "This host's hooks already capture corrections" (#49)--capture auto and a capture_heartbeats row for this --host and project in the last 30 min (the UserPromptSubmit hook writes it)by design; --capture tools to record anyway
a record tool says "Not saved: that looks like it contains a secret" (#50)findSecrets hit in the text, evidence or files; nothing storedrestate without the secret
"Saved for review", or a correction the user typed, and the next session doesn't know it (#45, #51)every note is pending until the user accepts it (hook captures and digests too); only this project's memory_search/memory_get show it, unreviewed; saying it again never accepts itthe user accepts in ad review or ad memory held accept <id>
ad review: accepting notes can't run from the agent's own shell / … needs an interactive terminal / … under an agent (claude), or a dialog code (#52)the review token: AD_TOOL_SHELL=1, stdin/stdout not a TTY, or an agent process above the terminal (memory/ancestry.mjs); an editor's terminal or a broken chain needs a code from a native dialog; no --yes, no env overridethe user runs it in their own terminal and types the code; never work around it for them
the memory installer prints ✗ <host>: …; add this yourself: (#53)it changes only its own entry and refuses a config that doesn't parse, is read-only, already defines agent-daemon-memory outside its control (TOML table, dotted keys, inline table) or is ad's engine homefix or remove the user's entry, then install again; or paste the snippet; repair --adopt claims a hand-made entry
memory tools missing in a host after install (#54)hosts read MCP config at startrestart the host; ad memory doctor (smoke.legacy/smoke.modern start the entry like the host; node.path fails after a Node upgrade → repair)
doctor "no SQLite driver", or writes fail with "no such module: fts5" (#89)memory runs on better-sqlite3, else Node's built-in SQLite, which has full-text search only from Node 22.16Node 22.16+, or cd runtime && npm install; doctor's "SQLite driver" row names the one in use (AD_SQLITE_DRIVER picks)
the memory server stops: "the host didn't expand ${…}" (#90)the host passed a variable it didn't replace (Cursor's ${PLUGIN_ROOT}); ad won't read a wrong paththe installer route, which writes absolute paths: npx agent-daemon-memory install or ad memory install
doctor capture.double (#55)Claude Code has ad's hooks and the entry uses --capture toolsinstall --host claude-code --capture hooks
ad mistakes: "Run it again with --yes to read them" (#92)it reads history only after a yes, and there was no terminal to ask inthe user runs it in a terminal and answers y, or passes --yes themselves; never run it on the user's real history for them
ad mistakes: "No Claude Code or Codex history found for this project" (#93)"this project" is the git repository (outside one: only that exact folder); Claude Code deletes transcripts after cleanupPeriodDays (30); CLAUDE_CONFIG_DIR/CODEX_HOME move the history; headless runs (claude -p, codex exec) are left out--all-projects; run from the work folder with the agents' own env; raise cleanupPeriodDays
ad mistakes: "Skipped N compressed Codex sessions" (#94)Codex's older .jsonl.zst files need Node 22.15+ (zstd)update Node
capture files missing from <repo>/.agent-daemona folder without its own .agent-daemon/ keeps journal, proposals, session log and telemetry in ~/.agent-daemon/projects/<slug>-<hash8>/ (memory/project-dir.mjs)by design: capture never creates a folder in a repo; ad init gives the project its own folder

Accounts, providers, limits and fallback

API keys live in ad's local gateway, never in the engine: provider errors are often the gateway's own words ("ad: …").

SymptomCauseFix
"ad auth: <account> needs its key again" (#60)the picked account (--account, AD_ACCOUNT, project, default) has no working keythe command it names; or another --account
"ad can't read its account list … Run: ad auth repair", doctor "Account repair", "written by a newer ad", "Another ad is updating the account list" (#91)the list (~/.agent-daemon/accounts/registry.json) is damaged, or an interrupted sign-in or key change left a half-made account or an orphan key; ad never resets the list itself, and only reads a newer ad's listthe user runs ad auth repair (asks before restoring the backup or deleting a key); "updating" passes when the other command ends; "newer ad": update ad
"account changes can't run from the agent's own shell"ad auth login/use/rename/logout/remove/repair from a tool shell (AD_TOOL_SHELL=1)run it in your own terminal; list, status, test work anywhere
""x" matches 2 accounts" / "no account matches"an ambiguous or unknown account referencename it as provider/label; ad auth list
"The key was refused (HTTP 401), so it wasn't saved" (#63)the provider refused the keycopy it again; the command it names
"Couldn't reach <host> … The key is saved" (#64)no network while adding a keyad auth test <provider>/<label> later
"This endpoint speaks only Chat Completions" (#65)the endpoint has no Responses APIOllama 0.13.3+, LM Studio, vLLM or OpenRouter
"Ollama isn't answering on localhost:11434" (#66)the local server isn't runningollama serve / lms server start
"This conversation used an account you removed" (#62)its API account is gonea new conversation
"ad: couldn't reach <host>" (#58)ad's gateway couldn't connect to the provider (network, proxy, company certificate)NODE_EXTRA_CA_CERTS for a company CA; the gateway can't use an HTTP proxy yet
"ad: the provider redirected" (#59)the endpoint redirects; ad never follows a redirect with a keyuse the provider's final /v1 address
This provider can't take … through ad / ad can't pass … to this provider (HTTP 400 from the gateway) (#67)a Chat-only provider (translated route) got something it can't carry: live web search, a stored response, an image for a non-vision modelturn the feature off (ad tools disable web-search) or pick another model
<provider>: the daily limit is used up on a failed turn (#68)the gateway classified the provider's 429 as a period quota and answered insufficient_quota, so the engine doesn't retrywait for the reset or switch accounts; if a per-minute body was misread, fix translate/errors.mjs with that body as a test
… can't read this chat's earlier reasoning any more (#71)a reasoning envelope sealed for this provider and model no longer opens (the gateway-seal key in the secret store changed)a new chat; foreign or other-model reasoning is sent empty, never refused
"This chat's earlier Gemini steps can't be replayed" (#72)a tool call in the current Gemini turn has no thought signature (it ran on another model, or before ad kept them); ad never makes one up. Without a secret store, signatures live only while ad runsa new chat on Gemini, or continue on the previous model
OpenCode Go's usage limit is reached / This OpenCode Go model isn't available to ad yet (#69, #70)Go's plan window is used up (GoUsageLimitError → insufficient_quota), or the model is on a wire ad doesn't route for Go yetwait for the reset or pick another model; a listed model never changes wire on its own: fix the dated table in the opencode-go preset
"The engine kept this conversation on …" / "still busy" (#61)a move to another account while a turn or background terminal runswait, switch again, or a new conversation
"Couldn't switch to … Still on …" (#74)a mid-task switch stopped before anything moved: sign-in, an unlisted model, the target's engine, the engine kept the old provider (fork answer), or a goal/subagent kept starting turnsnothing changed; fix the named reason and pick the account again; a kept provider: switch again (it takes the continuation path) and report it
"This session is open in another ad window" / "couldn't write this session's record" (#73)one window writes a session's record (~/.agent-daemon/sessions/); a failed write (disk, permissions)the conversation goes on either way; close the other window; check the folder is writable; AD_LEDGER=0 turns the record off
"price unknown" (#75) / "upgrade to Plus" (#76)the provider's list gives no price (or it's a day old); the ChatGPT plan doesn't include the use (not a quota)ad auth models <account> --refresh; pick an account whose plan includes it
limits blank, "not reported by this provider" (#82)ad shows only what a provider reported: numbers past their reset or 6 h old are dropped, never shown as 0%/usage re-reads OpenRouter; ad auth list --refresh (OpenRouter keys), --refresh=all (also starts unused ChatGPT sign-ins' engines, never one in use)
/fallback or ad fallback rows say "skipped now", or "None of these targets fits …" (#77)fallback is off, or no target fits its rules now: a price not checked in a day under "free only", a metered model under "no extra spend", an unconfirmed trial endpoint, an account needing sign-in, a provider benched until its reset (every account of it, any window), the per-hour capad fallback preview --error quotaExhausted; ad auth models <account> --refresh; add a free model or ad fallback set cost noExtraSpend
"Fallback is off: … changed since you confirmed the order" (#78)the consent fingerprint covers the order, each target, the account's identity, base URL and key revision, the cost and trial rules and the keep-running list; any change turns it off (lower limits don't)the user checks ad fallback, then ad fallback enable
"⏸ Paused: … may still be running from the failed turn" (#79) / "still running in the background" (#80) / "switching too often", "budget is used up" (#81)automatic fallback stops instead of moving: a command's end is unknown, a background command isn't on the keep-running list, or a limit (max-hops, max-switches, give-up) is reached; the session index shows paused with the reasoncheck the command, then /retry, /model or a new prompt; add servers to ad fallback set keep-running; raise a limit
ad run/ad loop exit 4, a scheduled job "paused: …", a team task blocked (#83)the run opted in to fallback and it couldn't move safely with nobody to ask; it never waits for a resetread the reason (stderr [ad] ⏸ Paused:, --json reason, schedule-logs/<id>.status.json); re-run after the reset, add a target, or allow the long-running command; the session keeps the work
a turn ended with a ↪ line and the engine's "Quota exceeded…" text is missingfallback acted on it: ad's line replaces the engine's, which stays in /warningsby design; ad sessions show --last has routeFailure and switchCommitted (reason policy)
"ad fallback can't be changed from the agent's own shell"AD_TOOL_SHELL=1: mutations and test --live refuse (list, preview, dry test and disable work); enable also needs a terminal even with --yesby design; the user runs it in their own terminal

ad tui

The terminal UI runs the same engine in the same home, so steps 1–5 apply. These are its own symptoms; details in docs/troubleshooting.md and docs/tui.md.

SymptomCauseFix
ad tui needs an interactive terminal, needs Node 22.17+ or 24.2+ on Windows, mintty, TERM=dumb (#23)a pipe or script, old Node on Windows (no VT input), or Git Bash's windowa real terminal; upgrade Node within 22.x; winpty ad tui; or ad chat
Shift+Enter sends (#24)Windows Terminal 1.24 and VS Code send it as EnterCtrl+Enter (Windows Terminal), Ctrl+J or \ + Enter anywhere; /terminal-setup prints the binding
ghost copies of the bottom lines after narrowing the window (#25)known: some terminals move the cursor further than the re-wrap; ad errs towards never erasing historyCtrl+L redraws. Ask for node runtime/scripts/tui-probe.mjs screen --bottom (narrow, then widen), its log and a screenshot
after a fullscreen ad tui was killed: the shell's output is gone, clicks print [<0;12;5M, no cursor (#86)ad leaves its screen on every exit it can see (quit, Ctrl+C, a crash, a closed window, SIGTERM); a hard kill (kill -9, End task, power loss) can'treset (macOS, Linux); in PowerShell 7 write the leave sequence from #86; or open a new tab. Stray text over ad's screen while it runs: Ctrl+L
fullscreen doesn't start, or the mouse doesn't reach ad (#88)inline is the default; --no-alt-screen, tui.alternate_screen = "never", an inline pick in /tui, or Apple Terminal over SSH keep it inline (only ad's engine settings count, not a project's); mouse off for tmux with its mouse off, "screen.mouse": false, or the old Windows console window/status's screen row names the rule; /tui picks fullscreen from the next start; tmux: set -g mouse on; node runtime/scripts/tui-probe.mjs mouse shows whether the terminal sends mouse reports
fullscreen: "Couldn't reach a clipboard" (#87)no system clipboard tool worked within 2 s (often Linux without a display) and the terminal ignored OSC 52install wl-copy or xclip; over SSH a terminal that accepts OSC 52; Shift+drag copies with the terminal itself; or inline (--no-alt-screen)
/undo says Not undone: <file> (<why>) (#26)the file changed after the turn; or during it by something other than the agent's edits (a command, the user's editor), also on top of an agent edit ("changed during the turn"); or a folder/file now stands in the way; or the snapshots never held itlook at the diff first; /undo force overrides only the "changed since…" kinds (a save after the agent's edit), never "changed during the turn", files the agent didn't edit, folders, or what the snapshots never held
/undo: The last turn has no checkpoint (…) (#26)the "before" snapshot (taken at Enter) wasn't done within 10 s, git fails in this repo, the turn was started by the engine itself (review, goal), or it predates ad tuinothing to undo for that turn; fix the git error if one is shown
ad's engine stopped (exit N). Your text is kept. Enter restarts and resumes. (#27)the engine exited and the 3 automatic restarts failedEnter retries; else /quit, ad doctor, ad tui --last. The reason is in logs_2.sqlite (step 5)
Ctrl+G: The editor returned at once without waiting (#28)the editor opened the file in a running window and exitedEDITOR="code --wait" or another editor that waits
This editor runs through cmd.exe, which can't take that file name safely / The editor "x" isn't on PATH (#47)EDITOR is a .cmd (VS Code's code.cmd) and the path has %, " or a line break; or ad looked only on PATH, never the current folderset EDITOR to the editor's .exe (with --wait), or its full path
thread … is open in another ad (pid N)one ad per conversation (locks in ~/.agent-daemon/locks)close the other ad tui; a crashed one's lock is taken over once its process is gone
"two engine folders" (#37)an older ad started after the codex-home link was removed, so both folders are realad doctor shows both with last use, count and sign-in; rename the one you don't want; delete nothing until checked. Only a folder with nothing but ad's first-run files is set aside by itself (<name>.empty-<date>, with a notice)
"Not moved: something is using …" or "an ad session is running (pid N)" from ad migrate (#38)a file or working folder inside is held open (another ad window, an editor panel, a loop, a terminal, antivirus), or a live conversation lockclose it and run ad migrate (or --undo) again
"codex-home points to X, which doesn't exist" / "can't be read (CODE)" (#40)the user's own codex-home or engine link to a drive that isn't connected or unlocked, or ad's own link from before ~/.agent-daemon moved; ad never replaces a link it didn't makereconnect the drive; if the folder is gone for good or the profile moved, remove only the link (rmdir on Windows); the next start remakes it
/x isn't in ad yet.an engine slash command ad doesn't run yet (never sent to the model)docs/commands.md lists every command
'/x' is disabled while a task is in progress.the engine's rule for that commandwait for the turn or Esc; the draft stays
keys set outside ad don't work in ad, or a chord ("ctrl-x ctrl-s", "leader c") does nothing (#30)ad applies tui.keymap only to its own actions and skips clashes, the prompt's editing keys and chords the engine refuses; a leader … chord needs a leader; chords are off while an approval or question is open/warnings (F2) counts the skips; /keymap lists each with the reason and names the leader; restart ad after editing
/clear wiped the scrollback (#31)the engine's /clear does/new keeps it; "clear.keepScrollback": true in ~/.agent-daemon/tui/prefs.json
window title still ad's after exit (#32)no title stack in the terminal, or a crashnew tab, or /title with every item off
/plan: "Plan mode unavailable right now." (#33)the engine didn't list its collaboration modes within 2 s of the engine starting (slow start, antivirus), or an engine build changed the experimental callrestart ad; check the engine version in ad doctor
/recap: "Could not generate a recap. Please try again." (#34)the temporary read-only thread didn't start or answer in time (30 s + 30 s), sign-in, or the answer wasn't the engine's recap format; no recap at all = a prompt or another turn dropped itretry while idle; /status for sign-in; the grey reason says which
/approve: "No recent auto-review denials…" or "invalid Guardian denial event" (#35)denials are kept per conversation while ad runs (10), not after a resume, not a subagent's; the refusal = an engine version ad wasn't tested withask the model to retry; ad doctor for the version
/setup-default-sandbox refuses or fails (#36)elevated sandbox = machine-wide + UAC; ad changes only a home it created; input waits while it runsapprove UAC; ad sandbox setup (non-admin); ad sandbox setup --elevated --force for a home ad didn't make

Reproduce TUI problems with ad tui in a scratch folder. Never run the user's own install or use ~/.codex.

Workers, skills and moving ad

SymptomCauseFix
ad sp: a name "can only use letters, digits, ".", "_" and "-"", or --model "…" isn't a model name ad can pass on (#41)team ids, roles and agent names become a git branch and a folder namea plain name (dev-ops), a plain model id
Claude workers: claude isn't on PATH, or Found claude.cmd, but ad can't tell what it runs (#42)ad starts Claude Code without a shell, on Windows only by its full path from PATH; a .cmd of an unknown shape would need cmd.exethe native claude.exe, or AD_CLAUDE_BIN set to claude.exe or the cli.js the .cmd runs; git isn't on PATH is the same for git
Claude workers: Your Claude Code doesn't know --append-system-prompt-file (#43)the worker's instructions go in a temporary file, which older Claude Code can't readclaude update
ad skill publish: a folder "was changed outside ad, so it wasn't overwritten" (#56)that host's skill folder has no .ad-skill.json from ad, or its SKILL.md changed since ad wrote itkeep it, or ad skill publish <name> --host <id> --replace (the old folder is backed up first)
ad review: a proposal is "in an old format ad can't apply" (#57)written before skill proposals were checksummed, or by handapply the change yourself and accept to file it, or reject and re-run /evolve (it queues through ad skill propose); a "damaged" proposal: reject
"Export stopped: … look like keys", or a name can't go into a bundle (#84)ad state export found key-shaped text (listed by row or file, never the value), or a file name another OS can't create--redact (the export only), or ad memory redact <table>:<id> in the user's terminal; rename the listed file
"Import refused", "made by a newer ad", "interrupted (imp_…)", "held back", "not mapped", "is a link" (#85)the bundle failed a check before any write; a newer ad's bundle; a crash mid-import; a memory file that reads like an instruction or holds a key; a project ad couldn't place; a project's .agent-daemon is a linkre-export with this ad; update ad; ad state import --resume <id> or ad state rollback <id>; read the held file, then --accept-held; --map <name>=<dir>; replace the link with a folder. The ad-state-migrate skill walks the whole move

Examples

Example 1: "ad run did nothing"

The agent says its shell was denied, and every command asks to run outside the sandbox. Step 5 shows CreateProcessAsUserW failed on a pwsh.exe under WindowsApps. ad --version says older than 2.1.1 → upgrade (re-run the one-liner), then re-run the step 4 probe from the same PowerShell.

Example 2: "tests won't run inside the agent"

node --test → spawn EPERM while node --version works. That's the unelevated sandbox. Tell the agent to run the test file directly, or verify the tests yourself after the turn.

Anti-patterns

  • Debugging in the user's repo. Probe prompts get captured as memory there.
  • Editing ~/.codex, or running the probe with the user's own install. It's the user's own install; the harness never runs the engine there, and codexEnv() refuses it. Debug with the harness home or a temp engine home only.
  • Turning the sandbox off (--sandbox danger-full-access) to make an error go away. Find the cause.
  • Running a guarded command for the user. Account changes, ad fallback enable, ad review accepts and ad memory redact refuse from the agent's own shell on purpose; hand the user the command.
  • Pasting log rows wholesale. They can be long; print the tail of the message, and never auth data.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.