---
title: "coding.sh improve · coding.sh docs"
description: "What to fix first in your sessions, the line that fixes it, and whether your last AGENTS.md changes helped. Every option of coding.sh improve and its…"
canonical: https://coding.sh/docs/cli/improve
human_url: https://coding.sh/docs/cli/improve
markdown_url: https://coding.sh/docs/cli/improve.md
agents_url: https://coding.sh/agents.md
llms_url: https://coding.sh/llms.txt
updated: 2026-11-11
---

# coding.sh improve

What to fix first in your sessions, the line that fixes it, and whether your last AGENTS.md changes helped. Every option of coding.sh improve and its…

coding.sh improve --help

```
coding.sh improve [action] [options]

  What to fix first in your sessions, the line that fixes it, and whether your last AGENTS.md changes helped

Commands
  fix           Add an issue's line to AGENTS.md or the agent's instructions file (uncommitted), then print the command that tests it
  check         Did each committed AGENTS.md, rule or skill change help? Sessions before vs after it; exit 1 when one made things worse

Options
      --since <WHEN>    Only sessions (check: changes) after this time: 7d, 12h, today or a date (local time) (default: 14d)
      --repo <DIR|all>  Only sessions under this directory, or all (default: this git repo)
  -a, --agent <AGENT>   Only this agent (repeatable, or a comma list: a,b)
      --headless        Include headless sessions (claude -p, an Agent SDK, codex exec), left out by default
  -n, --limit <N>       Maximum rows (default: 5)
      --fresh           Wait for every pending capture to be ingested (default: answer after 1.5 s)

Examples
  coding.sh improve
  coding.sh improve --since 30d --repo all
  coding.sh improve fix 1

Notes
  improve lists the failure flags in this repo's sessions and any command or tool that fails the same way in two or more sessions. Issues seen in two or more sessions come first, then by the severity score refine uses. Each issue has an example session, a fix, and the commands that take it through the loop: show, improve fix, exp ab, improve check.
  A failing test command that already failed before the agent changed any file is reported as a broken setup: fix the command first, or the agent can't check its work.
  Prompt cache paid for again (stored cache breaks) is an issue from $1 in two or more sessions: its dollars and share of the spend set its severity, with a fix per cause, costliest first.
  Headless sessions (claude -p, an Agent SDK, codex exec: scripts, judges and evals) are left out, and the first line says how many; --headless counts them. Eval and benchmark runs and subagents are always left out.
  A failed compound line (&&, ;, |, a loop) counts against the part that failed: the one its error names, the tool whose error it is, the part timeout stopped, or the last part of a pipeline. When nothing singles one out, the issue says compound command.
  When sessions ran on the repo's current harness version (the newest commit that changed AGENTS.md or another instructions file, a rule or a skill) and none of them had an issue, the issue is marked 'Not seen since <commit>', goes last, and points at improve check instead of a new line.
  check reads the git history of AGENTS.md, the Claude Code and Gemini instructions files, .claude/rules, .cursor/rules and skills. A session counts for the newest such commit its starting HEAD contains, so uncommitted edits count from the commit that keeps them. Sessions with no recorded HEAD, and sessions with no tool call outside MCP servers (a chat, or asking coding.sh about a change), are left out.
  check compares sessions with a failure flag before and after each change (overall and per flag), and, for each added line that names a command, flag, path or identifier, the share of sessions that acted on it. Two-sided Fisher exact tests at p ≤ 0.1: more flagged sessions is Regressed (exit 1); fewer flagged sessions, or one flag falling (Holm-adjusted) with no other rising significantly, is Helped, and its line names any flag that rose. A new line the agent follows while flagged sessions stay put is Followed, no effect yet. More tool calls or wall time per session (median 1.25x, permutation p ≤ 0.1) with no fall is Costlier; both suggest refine test git:<previous> to test the harness without the change. Under 5 sessions after a change without a clear result is Too early to tell.
  Under each change, check lists the sessions after it that still have a failure flag, newest first, with their flags (5, or all with --sessions; --json has every flagged session before and after).
  exp ab (the replay A/B that improve suggests) needs ANTHROPIC_API_KEY, OPENAI_API_KEY, or Claude Code or Codex logged in (it runs on your subscription then). Without any of them, commit the change and let improve check judge it on new sessions.
```

## `coding.sh improve fix`

Add an issue's line to AGENTS.md or the agent's instructions file (uncommitted), then print the command that tests it.

coding.sh improve fix --help

```
coding.sh improve fix <ISSUE> [options]

  Add an issue's line to AGENTS.md or the agent's instructions file (uncommitted), then print the command that tests it

Arguments
  issue         Its number in coding.sh improve, or its id (flag:no-verification)

Options
      --since <WHEN>    Only sessions (check: changes) after this time: 7d, 12h, today or a date (local time) (default: 14d)
      --repo <DIR|all>  Only sessions under this directory, or all (default: this git repo)
  -a, --agent <AGENT>   Only this agent (repeatable, or a comma list: a,b)
      --headless        Include headless sessions (claude -p, an Agent SDK, codex exec), left out by default
      --fresh           Wait for every pending capture to be ingested (default: answer after 1.5 s)
      --target <FILE>   Repo file to add the line to (default: the repo's instructions file that the issue's agents read, such as AGENTS.md)
      --dry-run         Show the exact changes without writing anything

Examples
  coding.sh improve fix 1
  coding.sh improve fix flag:no-verification --target AGENTS.md --dry-run
```

## `coding.sh improve check`

Did each committed AGENTS.md, rule or skill change help? Sessions before vs after it; exit 1 when one made things worse.

coding.sh improve check --help

```
coding.sh improve check [options]

  Did each committed AGENTS.md, rule or skill change help? Sessions before vs after it; exit 1 when one made things worse

Options
      --since <WHEN>        Only sessions (check: changes) after this time: 7d, 12h, today or a date (local time) (default: 30d)
      --repo <DIR|all>      Only sessions under this directory, or all (default: this git repo)
  -a, --agent <AGENT>       Only this agent (repeatable, or a comma list: a,b)
      --headless            Include headless sessions (claude -p, an Agent SDK, codex exec), left out by default
  -n, --limit <N>           Maximum rows (default: 5)
      --fresh               Wait for every pending capture to be ingested (default: answer after 1.5 s)
      --watch               Keep running and print a line when a change's verdict moves as new sessions arrive
      --interval <SECONDS>  With --watch: how often to re-check (default: 60)
      --sessions            List every session still flagged after each change, not just the newest 5

Examples
  coding.sh improve check
  coding.sh improve check --since 7d --json
  coding.sh improve check --sessions
```

[All commands](https://coding.sh/docs/cli) · [Global options](https://coding.sh/docs/cli#global)

To set coding.sh up for a user, follow the agent workflow at [/agents.md](https://coding.sh/agents.md).
