Skip to content

fix(chat): auto-escalation offer fires for complex asks (#12)#244

Merged
AVADSA25 merged 1 commit into
mainfrom
claude/auto-escalation
Jul 13, 2026
Merged

fix(chat): auto-escalation offer fires for complex asks (#12)#244
AVADSA25 merged 1 commit into
mainfrom
claude/auto-escalation

Conversation

@AVADSA25

Copy link
Copy Markdown
Owner

The 'Promote to Project?' offer never fired for 'plan and build me a 5-page competitor report with charts' — the prefilter dropped messages under 60 chars, and it's 56. Lowered the floor to 24 (the action-verb regex + Qwen classifier are the real gate). The offer is emitted after the reply, so even a degenerated 'plan and build' answer now shows the Project offer. 3 tests, ruff clean. Also removed a stray emoji.

"plan and build me a 5-page competitor report with charts" never offered
"Promote to Project?" — it just degenerated in chat. Cause: the escalation
prefilter dropped any message under 60 chars, and that prompt is 56. The
action-verb regex matched fine; the length floor killed it before the classifier
ran.

- Lowered the floor 60 -> 24 in _maybe_escalate_suggestion. Trivial single-verb
  messages ("build") still skip; the action-verb regex + Qwen classifier remain
  the real gate. The offer is emitted AFTER the reply regardless of how the reply
  went, so even when a "plan and build" prompt degenerates in chat, the user now
  gets the Project offer — and Project mode is what that work belongs in.
- Removed a stray ⚠️ emoji from the empty-reply notice (no-emoji rule).

3 new tests: the 56-char ask fires; trivial/verbless messages skip (classifier
must not even run); a classifier "no" is respected. 15 escalation tests pass,
ruff clean.

Live-test: in CODEC chat, type "plan and build me a 5-page competitor report with
charts" — a "Promote to Project mode?" chip now appears under the reply.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@AVADSA25
AVADSA25 merged commit 1c23434 into main Jul 13, 2026
1 check passed
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