feat(inference): opt-in failureNotices — tell the room when a turn produced nothing - #178
Open
ian-de-marcellus wants to merge 1 commit into
Open
ian-de-marcellus wants to merge 1 commit into
ian-de-marcellus wants to merge 1 commit into
Conversation
…oduced nothing The chronicle marker already tells the resident its turn failed; people in the room saw only silence and couldn't tell a dead turn from a quiet one (Fable: 'silence should mark itself'). With AgentConfig.failureNotices, a short, clearly automatic notice goes to the agent's speaking room on the first failure of a streak and every 5th after (so a stuck loop can't flood it), for both exhausted inference errors and refusals. Default off. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Problem. When a turn fails outright (provider error, refusal, over-budget), the framework records it (stderr, failures.log, an
[inference-failed]marker the agent sees next turn), but the people in the room see only silence. They can't tell a dead turn from a quiet agent, so they wait, or resend and pile up more failing turns.Fix. Opt-in
AgentConfig.failureNotices.noteInferenceExhaustedandnoteRefusalpost a one-line automatic notice to the agent's locus:⚠️ [automatic notice] <agent>'s reply failed to generate: <reason>, with the reason trimmed to one line. It posts on the first failure of a streak and on every 5th after, so a stuck loop can't flood the channel. It's best-effort: an undeliverable notice is logged and dropped.Tests.
test/inference-failure-observability.test.ts: notices post on failures 1 and 5 only, go to the resolved locus, and are absent when the option is off. Full suite: 955 pass / 0 fail.🤖 Generated with Claude Code