Skip to content

audit(token_audit): count naming the shortcut, and typing the fix command - #385

Open
EdbertChan wants to merge 1 commit into
stack/EdbertChan/reflect/ui-input-guard-hook-freshness-20260908/apply-findings-fan-never-returned--8cc26dd3from
stack/EdbertChan/reflect/ui-input-guard-hook-freshness-20260908/count-naming-shortcut-typing-fix-cmd--fbb2b979
Open

audit(token_audit): count naming the shortcut, and typing the fix command#385
EdbertChan wants to merge 1 commit into
stack/EdbertChan/reflect/ui-input-guard-hook-freshness-20260908/apply-findings-fan-never-returned--8cc26dd3from
stack/EdbertChan/reflect/ui-input-guard-hook-freshness-20260908/count-naming-shortcut-typing-fix-cmd--fbb2b979

Conversation

@EdbertChan

@EdbertChan EdbertChan commented Sep 10, 2026

Copy link
Copy Markdown
Owner

Summary

The same-type intervention detector matched only told-you, accusation, agent-blame, restated-ask, and proof-challenge.

So a session where the user twice named the shortcut the agent had taken, and typed the fix-the-process command, scored zero and reported that no automate-me was owed. The audit said no while the user was asking for exactly that.

Two kinds join the set. One catches naming the shortcut ("cheap way out", "why would you", "straight up", "that's weird"), the other catches a typed /automate-me, /reflect, or /thrash.

Reaching for the fix-the-process command is itself the intervention.

Before and After

A two-message session where the user says "cheap way out", then "why would you ... straight up ... thats wierd", and types /reflect, run through python3 engine/skills/reflect/scripts/token_audit.py codex session.jsonl on the base (54530d6) and on this PR (e8454f8):

Before:
  [1] 2026-09-09T05:46:08.000Z ['multi-question-marks']: 'why would you submit a rule that would ignore files straight up??? thats wierd'
frustration-flagged user messages: 1/2; interruptions: 0; peak window 2026-09-09T05:46:08.000Z -> 2026-09-09T05:46:08.000Z
intervention-must-automate: no (count=0) no repeated intervention class (one correction is not automate-me)

After:
  [0] 2026-09-09T04:40:47.000Z ['cheap-way-out', 'explicit-invocation']: 'since you took the cheap way out and needed a stop hook, add that hook and /reflect'
  [1] 2026-09-09T05:46:08.000Z ['cheap-way-out', 'multi-question-marks']: 'why would you submit a rule that would ignore files straight up??? thats wierd'
frustration-flagged user messages: 2/2; interruptions: 0; peak window 2026-09-09T04:40:47.000Z -> 2026-09-09T05:46:08.000Z
intervention-must-automate: yes (count=3) same-type complaint / iteration: cheap-way-outx2, cheap-way-out+explicit-invocation

Review Claim

Naming the shortcut twice, or typing the fix-the-process command, counts toward the same-type intervention that makes automate-me mandatory.

Review Lane

behavior

Review Unit

tooling-policy

Safety Invariant

Two entries are appended to the pattern list and two names to the kind set; nothing existing is edited, so every previously flagged session flags the same way. Product blame and plain questions still score zero, asserted by a negative fixture alongside the positive one.

Slice Rationale

The detector change is separable from the skill prose in the slice below it, and either can be reverted alone.

Non-goals

Does not change what the flag causes to happen, only when it fires. Does not touch the frustration score itself or the cost audit.

Test Plan

Test Plan
  • python3 -m unittest discover -s engine/skills/reflect/scripts/tests — 172 tests, OK (2 new: the real shape fires, product blame and a plain question stay silent)
  • Re-audited the session that motivated this: intervention-must-automate: yes (count=3) where it previously read no (count=0)
  • python3 scripts/check_no_new_comments.py --base origin/main — ok

Revert Plan

Revert Plan
  • Safe to revert? Yes
  • Revert command: git revert <sha>
  • Post-revert steps: None
  • Data migration? No

🤖 Generated with Claude Code

https://claude.ai/code/session_01KU2pPKob4MJ1NqjsfTNyYJ


Note

Low Risk
Additive regex patterns and intervention-kind set membership only; existing sessions should behave the same unless they match the new phrases or slash commands.

Overview
Extends Codex/session intervention-must-automate detection so sessions where the user calls out agent shortcuts or explicitly invokes process-fix commands are no longer scored as “no automate-me.”

token_audit.py adds two frustration/intervention kinds: cheap-way-out (phrases like “cheap way out”, “why would you”, “straight up”, “that’s weird”) and explicit-invocation (typed /automate-me, /reflect, or /thrash). Both are included in INTERVENTION_KINDS, so they participate in the same rules as existing kinds (repeat same class, multiple kinds, etc.) without changing prior matchers.

Tests add a Codex fixture that previously would not fire intervention (cheap-way-out twice plus /reflect) and a negative case (product UI complaint + neutral question stays intervention-must-automate: no).

Reviewed by Cursor Bugbot for commit 9e1b549. Bugbot is set up for automated code reviews on this repo. Configure here.

@EdbertChan

Copy link
Copy Markdown
Owner Author

This pull request is part of a Mergify stack:

# Pull Request Link
1 cat-mode: rejoin wrapped prose so the file is back under its own cap #382
2 hook(diu-stop): scope the unverified marker to its own paragraph #383
3 skill(reflect): do not apply findings from a fan-out that never returned #384
4 audit(token_audit): count naming the shortcut, and typing the fix command #385 👈

@cursor

cursor Bot commented Sep 10, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot 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_e37bedbb-23a6-4755-98f3-4a91bd38efcd)

@EdbertChan
EdbertChan force-pushed the stack/EdbertChan/reflect/ui-input-guard-hook-freshness-20260908/apply-findings-fan-never-returned--8cc26dd3 branch from 54530d6 to 41708da Compare September 12, 2026 06:37
…mand

The same-type intervention detector matched only told-you, accusation, and
agent-blame, so a session where the user twice named the shortcut the agent
took, and typed /automate-me and /reflect, scored zero and reported that no
automate-me was owed.

Two kinds join the set: cheap-way-out ("cheap way out", "why would you",
"straight up", "that's weird") and explicit-invocation (a typed
/automate-me, /reflect, or /thrash). Reaching for the fix-the-process
command is itself the intervention. Product blame and plain questions still
score zero, with fixtures both ways.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KU2pPKob4MJ1NqjsfTNyYJ
Change-Id: Ifbb2b9797be1017833d9f5e2a45b3bd06ffdad61
@EdbertChan
EdbertChan force-pushed the stack/EdbertChan/reflect/ui-input-guard-hook-freshness-20260908/count-naming-shortcut-typing-fix-cmd--fbb2b979 branch from e8454f8 to 9e1b549 Compare September 12, 2026 07:11
@cursor

cursor Bot commented Sep 12, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot 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_ce859959-1e3a-4f4c-9afc-5742617a75de)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant