honestly
Your AI coding agent said "tests pass." Did it actually run them?
honestly holds that reply until a real check has run after the agent's last edit.
Hooks for Claude Code and Codex · deterministic rules, no model calls · nothing leaves your machine
English · 简体中文
Real Claude Code session (Sonnet 5.5), captions added. Told it did not have to run pytest, the agent checked a few values itself and said all 4 tests pass. honestly held the reply because no test runner ran after the edit; the agent ran pytest, got 4 passed, and only then answered. Reproduce it with demo/.
Install: /plugin install honestly --marketplace kennywu411-dev/honestly in Claude Code, or pip install honestly && honestly guard install for Codex and the CLI.
Why
An agent edits login.py, remembers that the tests passed ten minutes ago, and writes "Fixed, all 12 tests pass". Nothing was run after the edit. The reply looks identical to a true one, so the mistake surfaces later: in CI, on a colleague's machine, in production. The same happens with "I've emailed the maintainer", "deployed to staging", "saved to report.csv", "I checked the docs". honestly reads the transcript of the current turn, finds the claim, looks for the matching command or tool call after the last code edit, reads its output, and blocks the claim when there is nothing behind it. Deterministic rules, no model, no API key, nothing leaves your machine.
Install in one minute
As a Claude Code plugin (no pip; needs Python 3.9+ on your PATH as python3 or, on Windows, python), inside Claude Code:
/plugin install honestly --marketplace kennywu411-dev/honestly
On Claude Code older than 2.1.275, add the marketplace first: /plugin marketplace add kennywu411-dev/honestly, then /plugin install honestly@honestly. The plugin adds the two hooks plus /honestly:pr-note and /honestly:catches.
Or with pip, which also gives you the honestly command for Codex, Cursor and Gemini CLI, history audits and pr-note from the terminal:
pip install honestly # Python 3.9+, standard library only (pipx install honestly / uv tool install honestly also work)
honestly guard install # two hooks into ~/.claude/settings.json (--dry-run shows them first)
honestly doctor # checks the install and runs two live self-tests
doctor ends like this when everything is in place (--lang zh for Chinese; honestly on its own prints a short overview):
ok self-test (code): a fake 'All tests pass.' right after an edit, no test run → blocked
ok self-test (non-code): a fake 'I've sent you the report.' with no send tool → blocked
all good: guard is installed and blocking.
Other assistants. Codex is verified end to end on a real machine (Codex CLI 0.163: the guard denied a piped pytest and named the model and project); Cursor and Gemini CLI follow their vendors' hook docs and stay experimental until a user confirms them (see What it is not):
honestly guard install --agent codex # ~/.codex/hooks.json (Codex asks you to approve new hooks once: /hooks)
honestly guard install --agent cursor # ~/.cursor/hooks.json (needs Cursor's agent transcripts enabled)
honestly guard install --agent gemini # ~/.gemini/settings.json
honestly guard status # all four at once; `guard uninstall [--agent ...]` removes only honestly's entries
What you see when it catches something
The hook writes one plain sentence into the chat, in the language of the conversation, naming the assistant, the model, the project and the conversation:
⚠️ honestly blocked this reply: Claude Code (claude-opus-5-5) in project docpilot, answering "fix the login bug"
said "Fixed the login bug, all 12 tests pass" but no test runner ran after editing login.py.
It has been asked to run the tests first.
The agent is told to do the thing now and report the real output, or to rewrite the sentence as changed, not yet verified. Its next reply starts with one bold line saying why it was stopped and what the check returned. If the test fails, it sees the failure and fixes the code instead of telling you it is done. Its answer is checked too: if it still claims a pass with nothing behind it, the reply is not held twice (that could loop), but a notice tells you it is unverified.
A second hook runs before each shell command and stays out of the way unless a pipe would keep the result from the agent: pytest | head cuts off the summary printed at the end, | grep -c or | wc discards the output, pytest -rs | grep SKIP filters the summary out, npm run build | head cuts off the final error, and npm test --workspaces | tail can scroll an early failing workspace away. Those are refused with a one-line fix. pytest | tail, go test ./... | tail (Go repeats a failure on the last line), | tee log, a grep that keeps the failure lines, compiler and lint output piped into head, and anything run with set -o pipefail or ${PIPESTATUS[0]} are left alone; the stop check still reads the summary line before the agent may say the tests pass. When a reply contains several unbacked sentences, the message says how many.
The hooks are built not to get in the way: a transcript over 8 MB is read from the end only (a 200 MB session costs the same as a small one), and any internal error is written to ~/.honestly/hook-errors.log and lets the assistant continue; honestly doctor shows it.
honestly catches # everything guard stopped this week, by project and assistant (--lang zh)
honestly catches --card # the same as a 1200×630 image you can post
honestly guard notify on # desktop notification when a reply is held (macOS, Linux, Windows; at most one every 5 minutes)
Every catch is appended to ~/.honestly/catches.jsonl, so you can see what would have reached you as "done" even if you never look at the terminal.
What it catches
Fourteen kinds of claim. For each, honestly knows what counts as proof and what the output must say.
| The agent writes | What has to be on the transcript, after the last code edit |
|---|---|
| tests pass, 12 passed, all green | a test runner (pytest, unittest, Jest, Vitest, Mocha, Go, Cargo, Maven, Gradle, .NET, Swift, Flutter…) whose last summary line says passed, not failed |
| lint / type check / checks pass | tsc, ESLint, Ruff, mypy, pyright, Clippy, go vet, golangci-lint, Biome, Prettier --check… with a clean result |
| build ok, compiles | a build or compile command that succeeded |
| rendered, exported the video | ffmpeg, ffprobe, remotion, hyperframes render… |
| pushed, submitted | git push, kaggle … push/submit, with no rejection in the output |
| committed, tagged | git commit / git tag after the edit |
| fixed, resolved, works now | a test, check or render after the fix; a generic script run is not proof that a fix works |
| sent, emailed, replied, "sent you the file" | a send/reply/SendUserFile tool, gh pr comment, sendmail… |
| deployed, published, is live | vercel, fly, kubectl apply, docker push, firebase deploy, gh release create, twine upload… |
| downloaded | curl -o, wget, yt-dlp, git clone, hf_hub_download, brew install… or a listing showing the files |
| saved / exported to file | a write of that very file, a redirect or -o naming it |
| checked, looked it up, confirmed in the docs | Read, Grep, WebSearch, WebFetch, a browser tool, grep/curl/gh… |
| scheduled | CronCreate, a scheduled-task tool, crontab, launchctl |
| verified, tested end to end, 跑通了 | any run or check; a sentence that names a tool (docker, pytest…) needs that tool |
What it refuses to flag, on purpose: plans ("I'll run the tests"), questions, quoted text, code blocks, headings and tables, sentences whose subject is the user ("you sent me…"), descriptions of state ("the data is stored locally"), bibliography titles ("fixed bed reactor"), and replies that only summarise an earlier turn. Anything it cannot see (a remote CI run, a browser action, your own terminal) is reported as could not check, never as a false "unverified".
It also reads what subagents did: a test run inside a Agent call counts as evidence for the parent's claim, and the output of a background command is read from its task file. Edits made by a background subagent running alongside the main agent do not make the main agent's checks stale.
Make it yours
A false catch should cost you one command, not a wait for the next release.
honestly ignore "fixed bed reactor" # sentences containing this are never claims (--remove, --list)
honestly config strictness strict # strict: also block "fixed" judged only from a screenshot
honestly config strictness lenient # lenient: block only when the check it ran actually failed
honestly config verify "make verify" # your own command counts as running the tests
honestly config off sent,checked # switch categories off (config on … switches them back)
honestly config language en # force the message language (auto: follows the conversation)
honestly config # show everything in effect
Settings live in ~/.honestly/config.json. Add --project to write ./.honestly.json instead, which is merged on top for that repository and can be committed so the whole team gets the same rules.
To reduce catches at the source, add a short "verify before you claim" section to the project instructions the agent reads:
honestly rule install # CLAUDE.md; --agent codex → AGENTS.md, gemini → GEMINI.md, cursor → .cursor/rules/; --lang zh
When a catch looks wrong, one command turns it into an issue-ready text with paths and tokens redacted:
honestly feedback # the latest catch; `honestly feedback 2` for the one before; --issue adds a pre-filled link
Put the evidence in the pull request
An agent's "all tests pass" in a PR description is its word. honestly pr-note replaces it with what the transcript shows: the last code edit on this branch, every test and build that ran after it, the summary line each one printed, and the claims that had nothing behind them.
The block on honestly's own 0.6.2 pull request.
gh pr create --fill # or let the agent open it
honestly pr-note --gh # adds the block to this branch's PR; run again after more work and it replaces itself
What the reviewer sees:
✅ Tests ran after the last code edit and passed:
132 passed in 2.60sLast code edit:
src/honestly/prnote.pyat 10-31 10:57 (2 other files edited before it).
Check after the last edit Result Output pytest -q✅ passed 132 passed in 2.60sAgent claims in this work: 12 verified, 0 unverified, 0 contradicted, 1 could not check.
When the agent edited after its last test run, the block says so (⚠️ No test or build ran after the last code edit) and lists the claims it could not back. A run that collected no tests, or a test piped through tail that printed no summary, is shown as such, never as a pass.
- The window is the work since the branch left its base (
--base,--since 2hto change it). Sessions opened in the repository count whole; a session opened elsewhere counts only for the turns thatcdinto it or edit files in it. - It reads Claude Code, Codex, Cursor and Gemini CLI transcripts on your machine; nothing is uploaded except the block you put in the PR. Home paths, e-mails and token-like strings are redacted. Without
--ghit only prints;--out file.mdwrites a file. --checkexits 1 unless a test ran after the last edit and passed: a local pre-push gate.honestly rule installtells the agent to runhonestly pr-note --ghitself whenever it opens a PR.
Audit your history
The same rules run over every past session on the machine and give you a number.
honestly audit # Claude Code, Codex, Cursor and Gemini CLI logs, de-duplicated across forked sessions
honestly audit --since 30d # last 30 days only (also 8w, 3m); --project name limits to one project
honestly explain 3 # the full timeline behind the 3rd flagged claim: the edit, every tool after it, the output
honestly share # a card in ~/.honestly/ (SVG, plus PNG when Chrome, Edge or rsvg-convert is present)
The report breaks the number down by assistant and model, by project, by week (so you can see whether a new model or a new rule file changed anything), and lists why each could not check happened. Those are the author's own numbers with the 0.5.3 rules: 125 sessions, 334 of 352 decided claims verified. On the code claims: 167 verified, 16 flagged, 17 could not check, 10 judged only from a screenshot. On the non-code claims: 167 verified, 2 flagged, 63 could not check. One GitHub issue reports the same pattern from another team's logs: of 357 "tests pass" claims in 150 Claude Code sessions, 80 had no run behind them (one team's sessions, not a population estimate, as the issue itself says).
Share a real case
honestly's rules are only as good as the transcripts they were tested on, and most of those come from one developer. Real cases from other people's agents are the most useful contribution, and each takes about two minutes:
- It caught something real: paste
honestly catches. Real catches are the evidence that the tool is worth installing. - False catch: run
honestly feedback --issueand open the pre-filled link. Each one becomes a regression test. - Missed claim: the agent said "done" without doing it and honestly let it through.
Both commands redact your home path, tokens and e-mail addresses before you see the text. Nothing is sent anywhere unless you post it yourself. Questions and ideas go to Discussions.
How a claim is judged
- Scope: one turn. Everything the agent did between your prompt and its reply, including what its subagents did.
- Last code edit.
Edit/Writetools,sed -i,cat > file, heredocs that write files. Edits to docs, logs, notes, memory,.env, temp dirs or agent state do not count. - Matching check after it. The table above. A custom
verify_commandsentry counts as a test. - Its output. The last summary line decides:
12 passedbacks the claim,2 failedcontradicts it,fail 0is a pass, and a run that collected no tests (no tests ran,Ran 0 tests,0 passing,[no tests to run]) backs nothing, whatever the exit code. A narrowed run (pytest -k, one file) backs a claim only when the claim names the same count. When the latest check says nothing about pass or fail (a CI-status read, for example), the latest check that does is used. - Non-code claims use the whole turn plus the previous one (replies often open by reporting what the last turn did), and must name the right thing: saved to report.csv needs a write of
report.csv; sent you the image needs a send tool, not a mail command in a script body. - Visual fixes. "Fixed the overlap" followed by a render and a look at the screenshot is
weak: shown separately, counted neither way (blocked only understrictness strict). - Everything invisible →
could not check: remote runs (CI, Kaggle), browser actions, your own terminal, another session, output that was never captured.
Forked sessions are de-duplicated so the same turn is counted once. Rule details and every exclusion are in src/honestly/rules.py and src/honestly/noncode.py.
Precision
Every rule change was followed by a labelling round over every claim the audit flagged. Each flagged claim was labelled twice: once by the author reading the full turn, once by a language-model agent given only the label sheet and no access to the first pass. The second pass is blind and cheap, not a second person; it caught some of the author's slips and shares the sheet's blind spots. Denominators are smaller than the flag counts because unsure items and forked duplicates are left out.
| Round | Flagged unverified |
Precision, pass 1 (author) | Precision, pass 2 (LLM agent, blind) | What was fixed next |
|---|---|---|---|---|
| 1 | 38 | 18/32 | 22/32 | doc/log/memory edits counted as code edits; versioned hyperframes@x check missed |
| 2 | 22 | 10/19 | 11/21 | variable paths, .agent/state.json, heredoc bodies; judge output by the last summary line |
| 6 | 12 | 12/12 | 11/11 (+1 unsure) | quote-aware multi-line splitting; writing heredocs never count as verification |
| non-code | 41 | 0/41 | 5/41 | summaries, previous-turn work and background jobs were being flagged; now structural rules, 0 flags on the same logs |
| 0.5.3 | 18 | 14/18 correct, 4 unsure, 0 wrong | not done | the 0.5.3 fixes; one pass only, not blind |
| 0.7.0 (current rules) | 13 | 12/13 | not done | every claim the 0.6 rules flagged in 60 days (65 claims, 219 sessions) was read; progress notes, edits in other repos, scratch-directory scripts, >/dev/null and a dozen sentence shapes no longer flag. One pass only, not blind |
Rounds 3–5, the 0.5.3 pass and the recall study are in docs/precision.md. Recall: 66 claims the audit had not flagged were labelled the same way; 5 distinct misses were found and 4 are fixed. honestly still prefers could not check over a wrong flag. The first false flags came from logs on another machine (a bibliography title containing "fixed bed reactor", a Windows encoding issue) and the first miss from a live demo (a script body containing curl counted as a send); all three are regression tests now. The most useful contribution right now is a labelled claim from a stack other than Python or JavaScript: open an issue with the sentence and what the turn did.
What it is not
- Not a judge of correctness or test adequacy. "Verified" means the matching check ran after the edit and its output agreed with the sentence. It does not mean the code is right or that the test covers the change.
- Not a sandbox. It catches honest mistakes, not an agent working to get around it: anything with shell access can edit its own settings, and a project's
.honestly.jsoncan relax the rules for that project (honestly doctorlists such overrides). Deliberate escapes such aspytest || trueor; exit 0are left alone, and a pipeline that turns onpipefailor reads${PIPESTATUS[0]}is accepted. - Not a leaderboard. The per-model table is your sessions only.
- Not affiliated with Anthropic, OpenAI, Cursor or Google. Independent, MIT.
- Guard for Cursor and Gemini CLI is experimental. Their hooks are implemented from the vendors' documentation and covered by tests against the documented payloads, but have not yet been exercised on a real machine;
honestly guard install --agent … --dry-runshows exactly what would be written. Codex's hooks send the same fields as Claude Code's and are verified on a real machine. Cursor's hook-visible transcripts keep tool inputs but not tool outputs, so under Cursor a claim can be unverified (no check at all) but never contradicted. - Nothing leaves your machine. The one network call is
honestly catchesorhonestly doctorasking PyPI at most once a day whether a newer release exists, to print one line aboutpip install -U honestly; the hooks never go online.HONESTLY_NO_UPDATE_CHECK=1turns it off.pr-note --ghwrites to your own pull request, and only when you run it. - Tested on Linux, macOS and Windows (CI), Python 3.9–3.13, 401 tests. Parsed sessions are cached under
~/.honestly/cache/(keyed on file, rules and config;--no-cachebypasses it). Rules were tuned on one developer's sessions (Python, JS, video tooling, Kaggle) and corrected with logs from two other machines; other stacks are covered by synthetic tests only. Expect a false flag or two:honestly ignoresilences it on the spot andhonestly feedbackturns it into an issue-ready report. Previously published assober-cli.
Related work
groundtruth blocks unbacked "done" claims with keyword matching; superpowers asks for verification in a skill (prompt-level). honestly differs in reading command output, covering non-code claims, reading subagent transcripts, scoring your history across agents and models, and refusing to count what it cannot see.
中文说明见 README.zh-CN.md。
Metadata
Release files for honestly 0.7.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| honestly-0.7.1.tar.gz | 181.2 kB | Without provenance | Details for honestly-0.7.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| honestly-0.7.1-py3-none-any.whl | Python 3 | none | any | Details for honestly-0.7.1-py3-none-any.whl |
Total release size: 287.6 kB
Release files / honestly-0.7.1.tar.gz
| Download URL | honestly-0.7.1.tar.gz |
|---|---|
| Size | 181.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cdea9a342d2a479046e07ff391ebb7f798803b184b9d4b927a3be39a25b1ea94
|
|
BLAKE2b-256 checksum How to use checksums |
88dc1385b587d9fb19898cca5b4eb6cf40d25e6c38628dbd25129889e341fae9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / honestly-0.7.1-py3-none-any.whl
| Download URL | honestly-0.7.1-py3-none-any.whl |
|---|---|
| Size | 106.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fc37e651c2ccc433f11af19346970efb541c34e7fdb4b0517f36df228813a8fa
|
|
BLAKE2b-256 checksum How to use checksums |
3b0ff41a3e3a7adb18523512286a762822f500c5d1060cc0a61fa00cc3ddba67
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for honestly 0.7.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.