Dr. Claw is an open-source workspace that wraps existing command-line coding agents like Claude Code with four persistent state objects and a skill library, so open-ended research runs stay auditable and can recover in place from a failed step instead of being restarted.
You’ve handed a Claude Code session a vague task like “build me a rigorous classifier study on this dataset.” It writes files for two hours, produces something, and when you come back you can’t tell which decisions it made, why, or how to resume if one step blew up. Today you re-prompt from scratch or dig through terminal scrollback. The dominant pattern in this space is either fully autonomous research agents like AI Scientist that finish end-to-end with no takeover point, or general orchestration runtimes like LangGraph where you declare your own state schema. Dr. Claw sits in between: it keeps the existing coding-agent executor and layers structured state and human checkpoints around it.
The core move is to stop treating the coding agent as the whole system and instead treat it as one replaceable executor inside a workspace that owns the research process. Dr. Claw maintains four persistent objects that get updated every iteration: a Task Graph (dependency-aware task nodes with status), an Artifact Store (files produced), a Decision Log (human approvals and revisions), and an Execution Trace (timestamped tool events). A skill library of 171 entries, 58 of them mapped to research stages like survey, ideation, experiment, publication, contains directories with a SKILL.md manifest declaring name, version, allowed tools, and stage tags. When a task runs, a resolver picks skills three ways: a stage-to-skill map based on the task’s stage and type, keyword auto-loading from the user’s instructions, or manual invocation from a dashboard. Selected skills get injected into the next-action prompt handed to the backend executor. The loop is Plan, Execute, Verify, Write-back, with the write-back step formalized as adding new artifacts to the store rather than overwriting. On failure, non-destructive mutation APIs let you revise, retry, or hand off from any node without wiping earlier state.
while task := task_graph.next_pending():
skills = resolve_skills(task.stage, task.type, user_text)
prompt = build_prompt(task, skills, artifact_store)
result = executor.run(prompt) # codex or claude-code
execution_trace.append(result.events)
if result.failed:
wait_for_human(revise | retry | handoff)
else:
artifact_store.add(result.artifacts)
task.status = "done"
The prevailing bet in AI research tooling is to build a better autonomous agent, one that plans and executes end-to-end with minimal human touch. This paper argues the bottleneck is no longer execution capability but the orchestration shell around it: preserve the process as first-class state objects, keep the existing coding agent as a swappable executor, and give the human takeover points at arbitrary moments. The evidence that carries the thesis is the research-hygiene gap on open-ended prompts, not the raw completion score.
The load-bearing finding is where the two conditions diverge on open-ended research prompts. Both Dr. Claw and the bare Codex CLI agent (same backend, GPT-5.4, same permission profile) pass at 1.00 on modeling elements: multiple models, cross-validation, calibration, ablation, statistical rigor. The gap opens on research-hygiene items that a vague prompt won’t spell out. Dr. Claw’s skills lift limitations sections from 0.33 to 1.00, subgroup analysis from 0.33 to 1.00, and real literature citations from 0.00 to 0.67, where the bare agent produced zero citations across all three Derm7pt and clinical-note tasks. Pooled completeness is 0.952 vs 0.873 across 21 tracked elements, though the authors flag the 95% bootstrap CI of [-0.00, +0.14] includes zero with one run per task. Every Dr. Claw run persists a queryable task graph (mean 14 nodes), execution trace (mean 14 transitions), and decision log (mean 10 entries); the bare agent persists none by construction. Skill invocation is best-effort: on the one task Dr. Claw tied the baseline, the reference-audit skill never fired. A separate failure-recovery walkthrough shows an induced wrong-path error being fixed in place, keeping all 5 prior files and reaching accuracy 0.892 after 23 tool events.
Reach for this when you’re running long, open-ended coding-agent sessions where you need to prove later what the agent did and why. Instead of a scrollback you can’t query, you get a task graph with statuses, a decision log with your approvals, and an execution trace you can replay. It’s most concrete for research-style workflows on medical or ML datasets, but the pattern generalizes to any multi-stage agent job where a step failing shouldn’t nuke the prior state.
The workspace is open-source at OpenLAIR/dr-claw under AGPL-3.0 (with GPL-3.0 upstream components, worth checking before commercial embedding). It ships backend adapters for the Claude Code and Codex CLI SDKs plus Cursor hooks, and the 171-skill catalogue is directly reusable. Setup is Node.js LTS. The evaluated skill library is medical-domain flavored, so transfer to other areas means editing the stage-to-skill JSON map rather than code.
Treat the coding agent as a replaceable executor, and put the state, skills, and human checkpoints in a shell around it. Autonomous end-to-end agents optimize the wrong thing when the real cost is verifying and resuming their work; a durable task graph plus a decision log plus non-destructive recovery buys more than a smarter planner.
•
The comparison is one run per task on three tasks, all medical; the pooled completeness gap’s confidence interval includes zero, so this is directional evidence, not a powered result.
•
Skills are suggested but not enforced. When the reference-audit skill silently didn’t fire, Dr. Claw matched the bare agent instead of beating it. Reliability of invocation is the acknowledged weak point.
•
The wrapper adds latency and complexity by design (recording state costs work), and the baseline is the bare wrapped agent, not a state-of-the-art orchestrator like LangGraph with a hand-built schema. A more engineered competitor might close the hygiene gap.