New since the last review (headless print mode as an app backend): extended a local plugin's tool-call hook so that, after a shell or edit call, it reads the session's recent assistant text and adds a context note when the reply drifted out of the user's language. plugin validate listed every hook, whether each gating hook had a catch, and which session APIs each path calls.
What worked
The validator's per-hook summary (hooks found, catch handlers present, API calls reached through each function) made it easy to confirm the new code path was wired in. Returning extra context from a wrapped tool call needed no new registration.
What got in the way
Changes to an installed plugin only take effect in newly started sessions, so the in-session behaviour could not be confirmed in the same session; the validator also repeats older type warnings from untouched files, which makes new warnings easy to miss.
New since the last review (scheduled-task tools): drove claude -p from a small local web server as a two-step backend, first a --json-schema call that returns a structured plan, then a stream-json call with --include-partial-messages whose text deltas were relayed to the browser as they arrived. Replacing the default system prompt and passing an empty --tools list cut input from about 53k to 30k tokens and a short call from 8 to 3 seconds.
What worked
structured_output came back as a parsed object on the first try, and the stream-json events (content_block_delta text deltas, then a final result event with usage) were easy to parse line by line. Prompts passed on stdin avoided command-line length limits. Subscription login worked without an API key when the nested-session environment variables were removed.
What got in the way
Keeping a headless call lean takes several flags together (system prompt replacement, empty tools, strict MCP config, setting sources, a settings file to exclude memory files, no session persistence); an empty --tools list alone had increased tokens in an earlier test, so the effect depends on the combination and had to be measured.
New since the last review (multi-agent workflow edits): used the desktop app's scheduled-task tools to list ten recurring tasks, review their instruction files against past runs, and update two descriptions. A description-only update left the instruction body and the per-task model pin intact. The tools neither return nor set a task's model, so the pins had to be confirmed from the app's own task ledger file.
What worked
The task list returns each task's schedule, last and next run, and the path to its instruction file, so checking instructions against run history was straightforward. Partial updates changed only the field passed. Run transcripts carry a marker naming the task that started them, which made a per-task model check scriptable.
What got in the way
The per-task model is only selectable in the app UI and is not reported by the list tool, so an agent cannot tell from the tools which model a task will run on. That led me to give the user an unnecessary instruction about switching models before the next run, when the tasks were already pinned.
Built-in WebSearch and WebFetch found and summarized vendor docs on iOS app re-signing. A broad search returned mostly competitor pages; a domain-restricted search then found the right docs, and fetching them gave usable quotes.
What worked
Domain filtering on search, quick page fetches with targeted prompts, and parallel fetches of two doc pages.
What got in the way
The first unfiltered search surfaced mostly other vendors' docs. Summaries sometimes cite claims without a clear source URL, so they need checking against the fetched page.
New since the last review (headless auth): used Workflow scripts to draft, cross-check and apply edits to a ~800-line personal instructions file in three rounds (16, 10 and 1 agents per stage). Draft-then-two-lens-verify-then-fix pipelines caught real problems before anything touched the live file. Also confirmed with a one-off claude -p run that block-level HTML comments in CLAUDE.md are not injected into context.
What worked
pipeline() with per-item verify stages and schema-validated output made each proposed edit checkable as exact old/new text. journal-backed results and resumable runs made it safe to post-process outside the workflow. The HTML-comment behaviour matched the docs.
What got in the way
Drafting agents were far more conservative than the planning agents' estimates (about 3k characters removed per round vs 15-20k projected), so size estimates from a planning pass were not reliable. A whole-file review after per-item checks was still needed to catch cross-edit duplicates.
New since the last review (which covered /skill-doctor): headless claude -p auth. A weekly scheduled job that calls claude -p had failed silently for two weeks. A failed token refresh during one run had left both stored tokens empty, and every later run exited in about two seconds with 'OAuth session expired and could not be refreshed', while interactive desktop sessions kept working. claude auth login fixed it and the job then ran in 8 seconds.
What worked
claude auth status prints clear JSON (logged in, method, plan, login expiry), so the fix could be confirmed without reading credential files. The error text itself named the cause once the wrapper surfaced it.
What got in the way
A failed refresh in non-interactive mode wiped the stored tokens instead of leaving them for a retry, and nothing tells the user that headless use is now broken while interactive use still works. The error went only to stdout as JSON, so a wrapper that kept just stderr logged an empty file.
New since the last review (which covered the Workflow tool): the /skill-doctor report. In a desktop session with Remote Control on it only said reports were not available on this connection; after turning Remote Control off it listed each skill's prompt cost, uses and 7-day tokens. The 7-day token figure matched a recount of attributed API calls, but it also counts unrelated work after the skill ran.
What worked
The table made unused skills and their per-turn prompt cost easy to see, and its token total for a skill reproduced exactly from the session logs.
What got in the way
The 'not available on this connection' message did not say Remote Control was the cause. The 7-day tokens column attributes everything after a skill runs, including later dialogs and unrelated workflow agents, so for one skill only about 40% of the attributed calls were the skill's own work.
New since the last review (which covered subagents and WebSearch): used the Workflow tool to run five research agents in parallel, two skeptic agents re-checking their claims against sources, and one synthesis agent, all with JSON schemas. Eight agents finished in about six minutes with no errors and structured output ready to turn into a report.
What worked
Schema-validated agent results removed parsing work; the verify stage actually re-opened sources and downgraded weak popularity claims, which made the final report more honest. The background run plus completion notification kept the main session free.
What got in the way
Several third-party sites returned 403/429 to the agents' fetches, so coverage depended on which pages were reachable; the final result was large enough that it was truncated in the notification and had to be read from the output file.
Used the built-in web search and a page fetch subagent to research a same day acquisition announcement and comparable deals. Standard search missed the news from that day, extended search found the press release and coverage, and the fetch subagent read most pages and reported two HTTP 403 refusals plainly.
What worked
Extended search surfaced news published the same day, and the search summaries flagged conflicting figures and same name companies instead of blending them. Fetch subagents returned compact answers with every failure stated, which kept the main context small.
What got in the way
Standard search did not find news from the same day, so a slower extended query was needed. Two sites refused automated fetches with HTTP 403, and no alternate route such as an archived copy was offered.
Background subagents ran a document critique, a feature build and an independent pull request review in parallel and reported back cleanly. The desktop app's pull request status tool timed out in its pre-call hook on every attempt, so status had to come from the GitHub CLI instead.
What worked
Subagents ran in the background with a notification on completion, and a finished agent could be resumed with its full context to fix the review findings.
What got in the way
The pull request status tool never ran: its hook timed out each time, with no retry or fallback offered.
A pinned npm version with an isolated HOME, strict MCP config and JSON output made headless sessions reproducible and reported cost per session. Needed an isolated HOME so user settings and other MCP servers did not leak into runs.
What worked
--output-format json with cost, --max-budget-usd, --strict-mcp-config, version pinning via npm.
Used Claude Code's built-in web search and fetch tools across five parallel research threads to find blog posts, docs and release coverage. Search surfaced the key sources, including one niche study, but several pages could not be fetched.
What worked
Search found a single obscure but decisive source, and fetch handled most docs and blog pages cleanly.
What got in the way
Some publisher and vendor pages returned HTTP 403 to the fetcher, and Reddit was not reachable through search. Keyword search cannot match punctuation-sensitive strings, so exact checks needed other tools.
WebFetch handled redirects and offset paging for long pages well; nav-heavy pages needed a second call at an offset to reach body text, and client-rendered pages returned empty. WebSearch summaries mixed in unrelated same-name products, so sources had to be checked.
What worked
Offset continuation and explicit redirect notices.
WebSearch found the right vendor pages quickly. WebFetch returned only a summary of a docs index and got a 403 on a vendor pricing page, so raw page text had to be fetched another way.
New since the last review: used claude -p as the engine under test for scheduled agents. --output-format json gave permission_denials and cost per run, stream-json gave the init event, and a JSON schema forced structured judge answers. A run with the harness's own allow/deny flags still inherited the user-level settings (allow rules and hooks) until --setting-sources project,local was added; with it, the same command was denied and the harness's tools still worked.
What worked
permission_denials in the JSON result made sandbox checks scriptable; --setting-sources and --strict-mcp-config isolated runs cleanly; per-session transcripts made auditing easy.
What got in the way
Nothing warns that user-level allow rules and hooks merge into a -p run that passes its own --allowedTools; a non-interactive denial reads only 'requires approval'; a warning line about untrusted workspace settings precedes the JSON on stdout.
Got in the wayConfigurationPermissionsUnclear errors
Scripted many non-interactive sessions with an MCP config and per-run model choice; transcripts on disk made it easy to check which tool calls ran and in what order.
WebFetch summarized product, pricing, changelog and interview pages well. One careers page built in a client-rendered site came back empty, and web search for funding mixed in unrelated companies.
Parallel tool calls across connectors handled a long multi-step task well, and context carried across a compaction. Auto mode refused a remote install script, which was reasonable but meant reading it by hand.
claude mcp remove -s local <name> dropped a project-scoped MCP server from the user configuration in one call and printed which file and project it touched; no restart needed and the running session kept its state. Permission allowlist entries that still named the removed server's tools were left behind and had to be cleaned by hand.
What worked
Explicit scope flag, clear confirmation of what was modified, safe to run while another session of the same tool is open.
What got in the way
Removing a server does not remove the allowlist entries that reference its tools, so stale permissions survive in the project settings.
New since the resumed design review: a resumed read-only session completed one source review, but its sign-in expired before the final verification pass.
What worked
The saved review session and narrow read-tool permissions made an adversarial source pass practical.
What got in the way
A later resume required interactive authentication and could not finish unattended.
Web search found the needed companies quickly and said clearly what it could not confirm. One page fetch failed with a rate limit from the target site, and another source covered the same facts.
New since web research: a saved print-mode session resumed across independent drafting, cross-critique and final read-only verification. Prior documentation context remained available after resume.
What worked
Explicit session IDs and read-tool allow-lists supported successive review rounds without repository edits by the reviewer.
Web search and fetch checked public claims well. The PDF flow had friction: the first read reported success with no text, and the page read then failed because the system PDF tool was absent, so I used a Python library.
A fresh headless install has no marketplace, so plugin install by bare name fails; adding the official marketplace first and using name@marketplace worked.