oriliz/agent-crop
Developer ToolsLocal-first timing and reflection loop for DeepSeek Harness and Claude Code, turning session data into auditable agent-instruction improvements.
What it is
Agent Crop is a plugin that observes how a coding agent session spends time and converts that record into concrete, verifiable changes to the agent's instructions, skills, or tools. It targets developers running DeepSeek Harness (DSH) or Claude Code who want to know whether an agent is slow, stuck, or simply waiting on a human.
The loop is measure → attribute → optimize → verify: sessions are logged as structured events, the agent reflects on causes after a nudge, and a ledger records what was changed and why. Data stays in local JSONL under ~/.agentcrop/data with 0700 permissions and is not uploaded. There is no efficiency score or ranking.
Quick start
Install the DSH plugin and restart the harness:
dsh plugin --profile <your-profile> add agent-crop-dsh
The npm package is prebuilt, so no build script or pnpm allowBuilds approval is required, and no manual AGENTS.md edit is needed. To work on the source instead, clone and link locally:
git clone https://github.com/oriliz/agent-crop.git ~/agent-crop
dsh plugin --profile <your-profile> add ~/agent-crop
The crop command ships with the package but may not be on PATH after dsh plugin add. Optionally install it globally and verify that events are being recorded:
npm i -g agent-crop-dsh
crop status
tail -1 ~/.agentcrop/data/events.jsonl
The last line of crop status prints the real data directory; the legacy directory name is ~/.ai-coding-efficiency, and KIT_SHARED_HOME or KIT_DATA_DIR can override paths. For Claude Code, follow the separate install notes.
What gets recorded
Host-side instrumentation captures the workspace and task start, each tool call's name and success/failure, round duration, time spent waiting for the next human message (gaps over 15 minutes become idle_gap), reminder injection, and repeated-tool rework signals. The agent itself reports phase (start/progress/blocked/end), task_id, summary, cause, next, category (a fixed nine-value enum such as tool-misuse, spec-drift, no-evidence, serial-wait, design-churn), goal, type, and difficulty.
Self-reports are treated as judgments, not facts, and are compared against automatically collected timing and failure data. Conversation text is not stored.
Reviewing results
Two panel entry points exist: the session-level Crop tab shows an active/waiting clock, a timeline per work item, nudge markers, and the agent's reflections; the global Crop sidebar shows friction metrics, daily active/waiting stacked bars, recurring pitfalls, and a health view. Health checks are available both by command and to the agent:
crop health --days 7
crop health --json
In DSH the tool is crop_health; Claude Code exposes it over MCP alongside crop_update.
Constraints
- Host support is DSH and Claude Code; the
.exe-free npm package is the normal delivery path. - The author states that coverage of
type/difficultyis low and samples forverdict/rework/improveare sparse, so period-over-period comparisons often show no prior data. - Health thresholds (coverage ≥ 80%, field completeness ≥ 95%) are provisional and not yet calibrated on real data; with fewer than three sessions the tool only reports insufficient sample size.
- Global panels have no export, and no cloud or team dashboard exists.
- Removing the plugin does not delete data;
rm -rf ~/.agentcropdoes.
Customization
The nudge style is switched in the plugin sidebar without a restart: slavemaster (default, with red-line prompting), kind mentor, experienced colleague, or hands-off parent. Only the default style counts as a whip; the others change tone or reminder framing. Wording for the default style can be overridden with Markdown files under ~/.agentcrop/templates/voice/.
HotRepo's take
The repository's recorded star curve rises from 123 to 136 between 2026-11-20 02:46 and 04:16 UTC, and a new-project snapshot puts it at 136 stars with 13 gained in that roughly one-and-a-half-hour window. That is a short observation window, so it shows a fresh spike rather than a sustained trend. The project's own write-up is unusually candid about low event coverage and uncalibrated thresholds, which is the practical yardstick for anyone evaluating whether it can attribute time savings reliably.
Written by AI from the project's README, updated . The project's own docs are the source of truth.
You might also like
- ccch1mneyyy/dsh-GoAndroid client for DeepSeek Harness that runs the coding agent on-device or connects to a remote host.
- zeronsh/zeronA local control plane that lets you run, inspect and sync multiple coding agents from one desktop or headless app.
- QwenLM/qwen-codeA terminal AI coding agent that can read, edit, run and review code, with editor, desktop, web and chat interfaces.
- AI4XE/ParallaxA skill-based plugin that turns a rough coding request into a reviewed execution and audit loop for AI coding agents.
- MiniMax-AI/mcode-stackInstall the MiniMax Code team's coding-agent skills and workflows to structure planning, review, and long agent sessions.