diu waits for the word-list answer and says it in the same turn - #454
Merged
Conversation
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_1d565321-990e-4a74-bc65-55e9b7c11f3a) |
Five phrase lists under engine/hooks/diu-stop/phrases/ name the kinds of wording that left the user asking what a reply meant: words the assistant made up, raw code or setting names, internal tool names, tech jargon and abbreviations, and status words. Data and one test only; nothing reads them yet. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Gnua5cuAAF1ey1b7zRqJCC Change-Id: I4860c82b5b8a8a6b84a9397e289c7023fd5d7730
diu-stop turns every phrases/ word list into one question for the background judge, waits for the answer, and blocks the turn with a message that names the list and quotes the reply. A verdict delivered on the next prompt is one the user may never see, and Claude Code cannot push a message into an idle session. No question is asked without a transcript file, a quote that is not in the reply is dropped, and no answer in time ends the turn unblocked. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Gnua5cuAAF1ey1b7zRqJCC Change-Id: I825590c10c14ec3d968c99dd78067b5deb05a22c
EdbertChan
force-pushed
the
plan/plain-words-phrase-lists
branch
from
September 12, 2026 01:09
0c3ab81 to
eea6f19
Compare
EdbertChan
force-pushed
the
plan/diu-asks-the-judge
branch
from
September 12, 2026 01:09
8f15d77 to
2e4cd20
Compare
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_31dd4040-8250-4334-b58e-0c92f06e9c1b) |
EdbertChan
changed the base branch from
plan/plain-words-phrase-lists
to
main
September 12, 2026 01:24
Contributor
|
Tick the box to add this pull request to the merge queue (same as
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When a reply uses wording the user has had to ask about, diu now says so before the turn ends, and the agent rewrites it.
The five word lists become one question for a background model. The Stop hook waits for the answer, sixteen seconds in a live run.
If no answer arrives in time, the turn ends as it does today.
Review Claim
diu-stop builds one judge question from every
phrases/plain-words-*.json, waits for the answer, and blocks the turn with a message that names the list and quotes the reply.Review Lane
behavior
Review Unit
engine-runtime
Safety Invariant
No question is asked unless the payload names a transcript file that exists, so a harness payload without one, and every test, calls no model: the full diu-stop suite leaves zero job files behind. A verdict whose quote is not in the reply is dropped. No answer within the wait ends the turn unblocked.
Slice Rationale
This PR reads the word lists added by the PR below it, so it stacks on #446.
Delivering the answer on the user's next message was the first shape, and it was wrong: Claude Code has no way to push a message into an idle session, so a verdict nobody reads is a verdict the user never sees. Waiting is the only way to show it in the same turn.
Claude Code only for now. Cursor and Codex keep the behavior they have.
Non-goals
llm-judge, its inbox, or the word lists themselves.Architecture
Before
graph TD S["Stop hook"] --> W["word count"] S --> C["unproven claim"] W --> B["block the turn, or let it end"] C --> BAfter
graph TD S["Stop hook"] --> W["word count"] S --> C["unproven claim"] S --> P["one question from every plain-words list"] P --> J["background judge: one model call"] J --> V["answer, or nothing in time"] V --> Q["drop an answer that does not quote the reply"] W --> B["block the turn, or let it end"] C --> B Q --> BTest Plan
Test Plan
python3 -m unittest discover -s engine/hooks/diu-stop/tests, on the branch rebuilt onto current main:Ran 97 tests ... OK, and the job folder held zero files before and after, with no model calls runningclaude_stop_check.pywith its own state folder: reply "No hook decides differently. Preflight passes and the review unit is engine-runtime." gavehook exit=2 after 16sand the messagediu: the last reply used wording the user has had to ask about (plain-words-internal-names): "Preflight passes and the review unit is engine-runtime."uvx ruff check . --select E9,F:All checks passed!check_no_new_comments.py,check_no_dated_provenance.py(both--basethe diu word lists: five kinds of wording to avoid in replies #446 branch),check_hook_test_coverage.py engine/hooks/diu-stop: all exit 0python3 engine/skills/make-pr/scripts/preflight.py --base <the #446 branch>: exit 0,declare Review Unit: engine-runtimeRevert Plan
Revert Plan
git revert <merge-sha>🤖 Generated with Claude Code
https://claude.ai/code/session_01Gnua5cuAAF1ey1b7zRqJCC