Skip to content

ENG-838: cap RESILIENCE_NUDGE with an honesty floor#256

Open
alecantu7 wants to merge 1 commit into
stagingfrom
alejandrocantu/eng-838-harden-resilience-nudge
Open

ENG-838: cap RESILIENCE_NUDGE with an honesty floor#256
alecantu7 wants to merge 1 commit into
stagingfrom
alejandrocantu/eng-838-harden-resilience-nudge

Conversation

@alecantu7

Copy link
Copy Markdown
Contributor

What

Rewrites the transient RESILIENCE_NUDGE (anton/core/llm/prompts.py, injected after 2 same-tool failures) to keep its "try a workaround first" value but add an explicit honesty floor, and drops the risky closing line "Only involve the user if the problem truly requires something only they can provide."

Why

  • Redundant: the always-on PROBLEM-SOLVING RESILIENCE block in CHAT_SYSTEM_PROMPT already covers the same workaround guidance with safer user-involvement wording.
  • Riskiest wording in the fabrication path: that closing line is the ENG-296 "smoking gun" — it biases away from involving the user at the moment a tool fails. No observed harm today (the STUCK verdict + act_first honesty rules win — see the ENG-296 close-out), so this is defense-in-depth to lower the probabilistic tail risk.

Kept (not deleted) for its just-in-time salience.

Diff

Before: "…Before retrying the same approach or asking the user for help, try a creative workaround… Only involve the user if the problem truly requires something only they can provide."
After: "…Before retrying the same approach, try one or two genuine workarounds… If those also fail, STOP and tell the user exactly what failed and what you need — do NOT fabricate a result, claim success, or silently give up. Once real options are exhausted, asking the user is the correct move."

Safety / scope (verified)

  • Opening marker "This tool has failed twice in a row." retained — two e2e tests (test_loop_safety, test_circuit_breaker_evasion) detect the nudge by it.
  • test_resilience_nudge.py checks identity against the constant (rewrite-safe).
  • No change to firing logic (resilience_nudge_at), the circuit-breaker escalation, or the scratchpad SIZE/TIMEOUT nudges.
  • Full suite: 1204 passed (only pre-existing scratchpad-exec env failures).

Remaining (Done-when)

  • Eval: add a blocked-task case to the ENG-381 harness to measure fabrication rate before/after (prove resilience isn't weakened). Not in this PR — prompt change is text-only and test-covered; flagging so it isn't lost.
  • Delivery: cowork pins anton main, so reaching the desktop path also needs the anton staging→main promotion + a cowork-server uv.lock bump.

Closes ENG-838.

The transient nudge (injected after 2 same-tool failures) ended with "Only
involve the user if the problem truly requires something only they can
provide" — the riskiest wording in the fabrication path (ENG-296 smoking gun)
and largely redundant with the always-on PROBLEM-SOLVING RESILIENCE block.

Keep the just-in-time "try a workaround first" value but cap it: after one or
two genuine workarounds, STOP and tell the user what failed — never fabricate
or claim success. Opening marker "This tool has failed twice in a row." is
retained (two e2e tests detect the nudge by it). Firing logic and the
scratchpad SIZE/TIMEOUT nudges are unchanged.

Defense-in-depth — no observed harm today (STUCK verdict + act_first honesty
rules currently win); this lowers the probabilistic tail risk of fabrication.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@alecantu7
alecantu7 force-pushed the alejandrocantu/eng-838-harden-resilience-nudge branch from a815bf7 to 43cd3f7 Compare July 17, 2026 00:43
@alecantu7

Copy link
Copy Markdown
Contributor Author

Self-review

Reviewed the diff + consistency against the escalation ladder and the always-on PROBLEM-SOLVING RESILIENCE block:

  • Applied: changed "try one or two genuine workarounds""try one or two more genuine workarounds" (43cd3f7). The nudge fires after 2 failures, so "one or two more" (3-4 total) now unambiguously aligns with the persona block's "exhaust at least 2-3 approaches" — removes a possible under-persistence read.
  • Noted (no change, intended): the nudge now steers toward honest "stop and tell the user" once workarounds fail (~failure 3-4), earlier than the failure-5 circuit-breaker — that's the intended direction (honesty over grinding); the circuit-breaker stays as a backstop.

Verified marker "failed twice in a row" retained, no test pins the nudge text, firing logic + scratchpad SIZE/TIMEOUT nudges unchanged. 13 targeted tests + full suite (1204) green.

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.

1 participant