Skip to content

Update the Guardian rejection-limit rule in the chat README #2003

Closed

Description

@dcramer

The Invariants section of packages/junior/src/chat/README.md says:

ask and deny become expected tool failures, and three consecutive rejections interrupt the execution slice.

#1529 changed this behavior on purpose. On the third consecutive rejection, Junior now does these things (tool-support/action-review.ts):

  • It throws a normal ToolActionRejectedError with instructions to stop retrying.
  • It records guardian.action_review.exhausted in Sentry.
  • It does not abort the run.

tests/component/tool-support/pi-tool-adapter.test.ts checks that onFatal is not called.

The README still states the old rule. Maintainers and agents use this README as the rule, so a later change can restore the old behavior by mistake.

Change

Replace the sentence with the current rule. For example: "ask and deny become expected tool failures. After three consecutive rejections, the rejection tells the agent to stop retrying. It does not end the execution slice."

Found in the test audit for #2001.

Activity

  1. added
    documentation
    on Oct 1, 2026
  2. added a commit that references this issue on Oct 9, 2026
    8869227
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentation

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions