Skip to content

fix(standing_rules): a mention is not a command — stop hijacking the turn - #299

Merged
AVADSA25 merged 1 commit into
mainfrom
fix/standing-rules-overtrigger
Jul 24, 2026
Merged

fix(standing_rules): a mention is not a command — stop hijacking the turn#299
AVADSA25 merged 1 commit into
mainfrom
fix/standing-rules-overtrigger

Conversation

@AVADSA25

Copy link
Copy Markdown
Owner

Found while verifying the premise check end-to-end — the check never fired, and this is why.

A message quoting:

"In that cleanup process, was there ever a rule you had to delete?"

fired the standing_rules skill, which tried to remove a rule named "you". The turn never reached the LLM, so the reply was a skill error — and neither the claim check nor the premise check ran, because both live on the LLM path.

Two causes

  1. "standing rule", "standing rules" and "my rules" were bare triggers — any message discussing standing rules matched.
  2. _REMOVE / _LIST / _CLEAR were unanchored — any sentence containing delete/list/clear near the word "rule" read as a command.

Triggers are now commands only; the regexes are anchored to the start of the message. A command is what a message opens with, not what it mentions. Same class as the file_ops chat-hang (#282).

Verified

Must still work Must not hijack
add a standing rule: be brief "was there ever a rule you had to delete?" ✅
show my standing rules "I like the idea of standing rules for agents." ✅
list standing rules "You mentioned you delete the rules that never fire." ✅
remove standing rule 2 "Rules you never invoke are just noise…" ✅

Plus a test asserting a mention can never delete a rule. 31 standing-rules tests · manifest regenerated · ruff clean.

…turn

Found while verifying the premise check end-to-end. A message quoting

    "In that cleanup process, was there ever a rule you had to delete?"

fired the standing_rules skill, which tried to remove a rule named "you". The
turn never reached the LLM, so the reply was a skill error — and neither the
claim check nor the premise check ran, because both live on the LLM path.

Two causes:

  * "standing rule", "standing rules" and "my rules" were bare TRIGGERS, so any
    message discussing standing rules matched.
  * _REMOVE / _LIST / _CLEAR were unanchored, so any sentence CONTAINING
    delete/list/clear near the word "rule" read as a command.

Triggers are now commands only, and the regexes are anchored to the start of the
message. A command is what a message opens with, not what it mentions. Same
class as the file_ops chat-hang (#282).

Verified: all four real commands still dispatch and execute; six mention-shaped
sentences — including the exact quoted question — dispatch to nothing, and a
mention can no longer delete a rule.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@AVADSA25
AVADSA25 merged commit e227d3f into main Jul 24, 2026
1 check passed
@AVADSA25
AVADSA25 deleted the fix/standing-rules-overtrigger branch July 24, 2026 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants