Home / Function/ _should_stop() — anthropic-sdk-python Function Reference

_should_stop() — anthropic-sdk-python Function Reference

Architecture documentation for the _should_stop() function in _beta_runner.py from the anthropic-sdk-python codebase.

Entity Profile

Dependency Diagram

graph TD
  21042fa5_2057_e026_e344_8ecf6abf02cc["_should_stop()"]
  74dfae5d_02b1_0e09_5e30_62a5a1ac1ac2["BaseToolRunner"]
  21042fa5_2057_e026_e344_8ecf6abf02cc -->|defined in| 74dfae5d_02b1_0e09_5e30_62a5a1ac1ac2
  98b55090_3b6f_2dd4_ca2d_6c52114d5a9e["__run__()"]
  98b55090_3b6f_2dd4_ca2d_6c52114d5a9e -->|calls| 21042fa5_2057_e026_e344_8ecf6abf02cc
  e767db6b_72ea_d60e_0f49_54ac2dd6c0a7["__run__()"]
  e767db6b_72ea_d60e_0f49_54ac2dd6c0a7 -->|calls| 21042fa5_2057_e026_e344_8ecf6abf02cc
  style 21042fa5_2057_e026_e344_8ecf6abf02cc fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/anthropic/lib/tools/_beta_runner.py lines 114–117

    def _should_stop(self) -> bool:
        if self._max_iterations is not None and self._iteration_count >= self._max_iterations:
            return True
        return False

Subdomains

Called By

Frequently Asked Questions

What does _should_stop() do?
_should_stop() is a function in the anthropic-sdk-python codebase, defined in src/anthropic/lib/tools/_beta_runner.py.
Where is _should_stop() defined?
_should_stop() is defined in src/anthropic/lib/tools/_beta_runner.py at line 114.
What calls _should_stop()?
_should_stop() is called by 2 function(s): __run__, __run__.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free