Skip to content

Add comprehensive Python SDK reference documentation - #1644

Merged
aantn merged 9 commits into
masterfrom
claude/update-python-sdk-docs-h8iPW
Mar 2, 2026
Merged

aantn merged 9 commits into
masterfrom
claude/update-python-sdk-docs-h8iPW

Conversation

@aantn

@aantn aantn commented Feb 25, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

This PR adds a new comprehensive Python SDK reference guide and refactors the Python installation documentation to better organize SDK usage information.

Key Changes

  • New docs/reference/python-sdk.md: Complete Python SDK reference documentation including:

    • Quick start guide with basic usage example
    • Tool listing and inspection examples
    • Follow-up questions with conversation context
    • Custom YAML-based toolset loading
    • Python-based toolset development guide with a complete incident management API example
    • Full API reference for Config, ToolCallingLLM, LLMResult, and ToolCallResult classes
    • Helper function documentation for build_initial_ask_messages()
    • Environment variables reference
    • Next steps and related documentation links
  • Refactored docs/installation/python-installation.md:

    • Removed verbose example code (moved to SDK reference)
    • Simplified quick start to a minimal, focused example
    • Updated model references from gpt-4.1 to anthropic/claude-sonnet-4-5-20250929
    • Added cross-reference link to the new comprehensive Python SDK reference
    • Improved formatting with consistent spacing
  • Updated docs/reference/.nav.yml: Added Python SDK reference to navigation menu

  • Updated mkdocs.yml: Added Python SDK reference to the documentation structure

Implementation Details

The new Python SDK reference provides:

  • Practical examples for common use cases (asking questions, following up, listing tools, inspecting tool calls)
  • Advanced patterns for writing Python-based toolsets with proper error handling, configuration validation, and health checks
  • Complete API documentation with parameter descriptions and return types
  • Best practices for thin API wrapper patterns and backwards-compatible configuration handling

The refactoring consolidates SDK documentation into a dedicated reference guide while keeping the installation page focused on setup instructions.

https://claude.ai/code/session_01RuoZoiEtUGjL4MnxDec572

Summary by CodeRabbit

  • New Features

    • Support for supplying additional custom toolsets programmatically, with automatic integration and prerequisite checks.
  • Documentation

    • Added a comprehensive Python SDK reference with examples and API overviews.
    • Consolidated the Python installation/quick-start content to point to the new SDK reference.
    • Updated site navigation to surface the new Python SDK reference.

- Fix incorrect defaults: max_steps is 40 (not 10), model has no default (not gpt-4.1)
- Fix model examples to use Anthropic Claude (anthropic/claude-sonnet-4-5-20250929)
- Remove non-existent tool.error field from examples
- Slim installation page to install stub + quick start with link to reference
- Add full API reference with correct signatures for Config, ToolCallingLLM, LLMResult, ToolCallResult
- Add custom YAML toolset loading example with sample toolset file
- Add Python-based custom toolset example with incident API pattern
- Update mkdocs.yml and .nav.yml navigation

https://claude.ai/code/session_01RuoZoiEtUGjL4MnxDec572
Signed-off-by: Claude <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Feb 25, 2026 •

Copy link
Copy Markdown
Contributor

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

📥 Commits

Reviewing files that changed from the base of the PR and between 8d5f15d and 978a659.

📒 Files selected for processing (1)
  • holmes/core/toolset_manager.py
 ____________________________________________________________________________________________________________________
< Always design for concurrency. Allow for concurrency, and you'll design cleaner interfaces with fewer assumptions. >
 --------------------------------------------------------------------------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ

✏️ Tip: You can disable in-progress messages and the fortune message in your review settings.

Walkthrough

Adds a centralized Python SDK reference and replaces in-file installation examples with a pointer to it; surfaces the new doc in navigation; adds Config.support for programmatic additional toolsets and threads them into ToolsetManager with prerequisite checks.

Changes

Cohort / File(s) Summary
Docs — Installation
docs/installation/python-installation.md
Removed extensive inline Python SDK examples and Quick Start blocks; replaced with a single reference pointer to the new Python SDK reference page.
Docs — New Reference
docs/reference/python-sdk.md
Added a comprehensive Python SDK reference page with Quick Start, examples, API reference, toolset loading, and helper utilities.
Docs — Navigation
docs/reference/.nav.yml, mkdocs.yml
Added "Python SDK" entry under Reference to surface the new docs page.
Core — Config
holmes/config.py
Added public field additional_toolsets: Optional[List[Toolset]] and pass it through when constructing the ToolsetManager.
Core — Toolset Manager
holmes/core/toolset_manager.py
Constructor accepts additional_toolsets; _list_all_toolsets merges them as ToolsetType.CUSTOMIZED; load_toolset_with_status ensures enabled additional toolsets have prerequisites checked (additional toolsets are not cached).

Sequence Diagram(s)

sequenceDiagram
    participant Config
    participant ToolsetManager
    participant ToolsetRegistry
    participant PrereqChecker
    Config->>ToolsetManager: instantiate(additional_toolsets)
    ToolsetManager->>ToolsetRegistry: _list_all_toolsets()
    ToolsetRegistry-->>ToolsetManager: combined toolsets (includes additional_toolsets as CUSTOMIZED)
    ToolsetManager->>PrereqChecker: check_toolset_prerequisites(enabled additional toolsets)
    PrereqChecker-->>ToolsetManager: prerequisites OK / errors
    ToolsetManager->>ToolsetRegistry: load_toolset_with_status(selected toolset)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • nherment
  • arikalon1
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the primary change: adding comprehensive Python SDK reference documentation. This is the main objective evident from the raw summary showing creation of docs/reference/python-sdk.md with extensive API reference and examples.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@netlify

netlify Bot commented Feb 25, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for holmes-docs ready!

Name Link
🔨 Latest commit 978a659
🔍 Latest deploy log https://app.netlify.com/projects/holmes-docs/deploys/69a55683883b63000905f371
😎 Deploy Preview https://deploy-preview-1644--holmes-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
docs/reference/python-sdk.md (1)

13-17: Optional: avoid overriding max_steps in the minimal quick start.

Setting max_steps=15 in the first example can read like a recommended default, while the API reference later states default is 40. Consider omitting it (or adding a short reason) to reduce ambiguity.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/reference/python-sdk.md` around lines 13 - 17, The quick-start example
sets max_steps=15 which conflicts with the documented default of 40 and may
imply a recommended override; update the example in the Config instantiation by
removing the max_steps argument (or replace it with a brief inline comment
explaining why a non-default value would be used) so the minimal snippet only
shows api_key and model and doesn’t imply a changed default; locate the
Config(...) call where max_steps=15 is present and remove or comment that
parameter.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@docs/reference/python-sdk.md`:
- Around line 13-17: The quick-start example sets max_steps=15 which conflicts
with the documented default of 40 and may imply a recommended override; update
the example in the Config instantiation by removing the max_steps argument (or
replace it with a brief inline comment explaining why a non-default value would
be used) so the minimal snippet only shows api_key and model and doesn’t imply a
changed default; locate the Config(...) call where max_steps=15 is present and
remove or comment that parameter.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e91ce1c and c8e4a1a.

📒 Files selected for processing (4)
  • docs/installation/python-installation.md
  • docs/reference/.nav.yml
  • docs/reference/python-sdk.md
  • mkdocs.yml

- Shorten install page link to "For the full API reference"
- Remove model_validator deprecated fields example
- Rewrite Python toolset section: add overview of what to implement and why
- Fix toolset example to match actual codebase patterns:
  - Tools subclass Tool with _invoke() and get_parameterized_one_liner()
  - Parameters use Dict[str, ToolParameter] not list of dicts
  - Tools return StructuredToolResult not plain strings
  - prerequisites_callable takes (config: dict) -> Tuple[bool, str]
- Simplify example: service status + search records HTTP tools

https://claude.ai/code/session_01RuoZoiEtUGjL4MnxDec572
Signed-off-by: Claude <noreply@anthropic.com>
SDK changes:
- Add `additional_toolsets` parameter to Config and ToolsetManager
- Additional toolsets are merged after built-in/custom YAML toolsets
- Prerequisites are always checked (not cached) for additional toolsets

Docs changes:
- Rewrite Python toolset example with tested httpbin.org pattern
- Fix _toolset assignment order (must be after super().__init__())
- Show end-to-end usage: define toolset + pass via additional_toolsets
- Switch API reference from bullet lists to tables for readability
- Add additional_toolsets to Config parameter table

All examples tested end-to-end with OpenRouter + Claude Opus 4.6.
All 1422 non-LLM tests pass.

https://claude.ai/code/session_01RuoZoiEtUGjL4MnxDec572
Signed-off-by: Claude <noreply@anthropic.com>
@github-actions

github-actions Bot commented Feb 25, 2026 •

Copy link
Copy Markdown
Contributor

📂 Previous Runs

📜 Run @ b70e19c (#22569201443)

✅ Results of HolmesGPT evals

Automatically triggered by commit b70e19c on branch claude/update-python-sdk-docs-h8iPW

View workflow logs

Results of HolmesGPT evals

  • ask_holmes: 9/9 test cases were successful, 0 regressions
Status Test case Time Turns Tools Cost
✅ 09_crashpod 49.7s 6 11 $0.2490
✅ 101_loki_historical_logs_pod_deleted 67.1s 7 15 $0.3396
✅ 111_pod_names_contain_service 50.7s 5 11 $0.2319
✅ 112_find_pvcs_by_uuid 49.4s 6 7 $0.2456
✅ 12_job_crashing 53.6s 5 12 $0.2571
✅ 176_network_policy_blocking_traffic_no_runbooks 72.2s 8 17 $0.3258
✅ 24_misconfigured_pvc 35.7s 6 12 $0.2400
✅ 43_current_datetime_from_prompt 10.0s 1 — $0.1126
✅ 61_exact_match_counting 37.0s 4 4 $0.1689
Total 47.3s avg 5.3 avg 11.1 avg $2.1706
📜 Run @ 8d5f15d (#22566275477)

✅ Results of HolmesGPT evals

Automatically triggered by commit 8d5f15d on branch claude/update-python-sdk-docs-h8iPW

View workflow logs

Results of HolmesGPT evals

  • ask_holmes: 9/9 test cases were successful, 0 regressions
Status Test case Time Turns Tools Cost
✅ 09_crashpod 33.9s 5 12 $0.2456
✅ 101_loki_historical_logs_pod_deleted 48.8s 7 12 $0.2856
✅ 111_pod_names_contain_service 32.9s 5 12 $0.2350
✅ 112_find_pvcs_by_uuid 25.5s 4 6 $0.2220
✅ 12_job_crashing 36.5s 6 12 $0.2503
✅ 176_network_policy_blocking_traffic_no_runbooks 40.7s 6 15 $0.2763
✅ 24_misconfigured_pvc 32.7s 5 14 $0.2346
✅ 43_current_datetime_from_prompt 5.1s 1 — $0.1115
✅ 61_exact_match_counting 15.6s 4 4 $0.1676
Total 30.2s avg 4.8 avg 10.9 avg $2.0286
📜 Run @ 915d1fc (#22400874312)

✅ Results of HolmesGPT evals

Automatically triggered by commit 915d1fc on branch claude/update-python-sdk-docs-h8iPW

View workflow logs

Results of HolmesGPT evals

  • ask_holmes: 9/9 test cases were successful, 0 regressions
Status Test case Time Turns Tools Cost
✅ 09_crashpod 40.6s 7 11 $0.2614
✅ 101_loki_historical_logs_pod_deleted 57.6s 8 14 $0.3218
✅ 111_pod_names_contain_service 34.3s 5 12 $0.2320
✅ 112_find_pvcs_by_uuid 24.7s 4 5 $0.1957
✅ 12_job_crashing 44.8s 7 15 $0.2890
✅ 176_network_policy_blocking_traffic_no_runbooks 41.3s 6 13 $0.2604
✅ 24_misconfigured_pvc 33.3s 5 13 $0.2334
✅ 43_current_datetime_from_prompt 5.1s 1 — $0.1116
✅ 61_exact_match_counting 19.6s 4 4 $0.1704
Total 33.5s avg 5.2 avg 10.9 avg $2.0757

✅ Results of HolmesGPT evals

Automatically triggered by commit 978a659 on branch claude/update-python-sdk-docs-h8iPW

View workflow logs

Results of HolmesGPT evals

  • ask_holmes: 9/9 test cases were successful, 0 regressions
Status Test case Time Turns Tools Cost Tokens Compactions
✅ 09_crashpod 30.0s 4 10 $0.2246 83,612 —
✅ 101_loki_historical_logs_pod_deleted 42.1s 5 10 $0.2543 107,526 —
✅ 111_pod_names_contain_service 37.0s 6 12 $0.2460 123,169 —
✅ 112_find_pvcs_by_uuid 24.9s 4 5 $0.1986 80,823 —
✅ 12_job_crashing 34.2s 5 12 $0.2489 109,730 —
✅ 176_network_policy_blocking_traffic_no_runbooks 49.9s 8 18 $0.3143 184,023 —
✅ 24_misconfigured_pvc 46.7s 8 18 $0.2976 171,872 —
✅ 43_current_datetime_from_prompt 6.1s 1 — $0.1123 17,533 —
✅ 61_exact_match_counting 14.0s 3 2 $0.1525 56,782 —
Total 31.7s avg 4.9 avg 10.9 avg $2.0491 935,070 —
📖 Legend
Icon Meaning
✅ The test was successful
➖ The test was skipped
⚠️ The test failed but is known to be flaky or known to fail
🚧 The test had a setup failure (not a code regression)
🔧 The test failed due to mock data issues (not a code regression)
🚫 The test was throttled by API rate limits/overload
❌ The test failed and should be fixed before merging the PR
🔄 Re-run evals manually

⚠️ Warning: /eval comments always run using the workflow from master, not from this PR branch. If you modified the GitHub Action (e.g., added secrets or env vars), those changes won't take effect.

To test workflow changes, use the GitHub CLI or Actions UI instead:

gh workflow run eval-regression.yaml --repo HolmesGPT/holmesgpt --ref claude/update-python-sdk-docs-h8iPW -f markers=regression -f filter=

Option 1: Comment on this PR with /eval:

/eval
tags: regression

Or with more options (one per line):

/eval
model: gpt-4o
tags: regression
filter: 09_crashpod
iterations: 5

Run evals on a different branch (e.g., master) for comparison:

/eval
branch: master
tags: regression
Option Description
model Model(s) to test (default: same as automatic runs)
tags Pytest tags / markers (no default - runs all tests!)
filter Pytest -k filter (use /list to see valid eval names)
iterations Number of runs, max 10
branch Run evals on a different branch (for cross-branch comparison)

Quick re-run: Use /rerun to re-run the most recent /eval on this PR with the same parameters.

Option 2: Trigger via GitHub Actions UI → "Run workflow"

Option 3: Add PR labels to include extra evals in automatic regression runs:

Label Effect
evals-tag-<name> Run tests with tag <name> alongside regression
evals-id-<name> Run a specific eval by test ID

Examples: evals-tag-easy, evals-id-09_crashpod

🏷️ Valid tags

benchmark, chain-of-causation, compaction, confluence, context_window, coralogix, counting, database, datadog, datetime, db-connectors, easy, elasticsearch, embeds, fast, frontend, grafana-dashboard, hard, integration, kafka, kubernetes, leaked-information, logs, loki, medium, metrics, network, newrelic, no-cicd, numerical, one-test, port-forward, prometheus, question-answer, regression, runbooks, slackbot, storage, toolset-limitation, traces, transparency


Commands: /eval · /rerun · /list

CLI: gh workflow run eval-regression.yaml --repo HolmesGPT/holmesgpt --ref claude/update-python-sdk-docs-h8iPW -f markers=regression -f filter=

@github-actions

github-actions Bot commented Feb 25, 2026 •

Copy link
Copy Markdown
Contributor

✅ Docker images ready for fe9e7e56 (built in 1m 5s)

⚠️ Warning: does not support ARM (ARM images are built on release only - not on every PR)

Use these tags to pull the images for testing.

📋 Copy commands

⚠️ Temporary images are deleted after 30 days. Copy to a permanent registry before using them:

gcloud auth configure-docker us-central1-docker.pkg.dev
docker pull us-central1-docker.pkg.dev/robusta-development/temporary-builds/holmes:fe9e7e56
docker tag us-central1-docker.pkg.dev/robusta-development/temporary-builds/holmes:fe9e7e56 me-west1-docker.pkg.dev/robusta-development/development/holmes-dev:fe9e7e56
docker push me-west1-docker.pkg.dev/robusta-development/development/holmes-dev:fe9e7e56
docker pull us-central1-docker.pkg.dev/robusta-development/temporary-builds/holmes-operator:fe9e7e56
docker tag us-central1-docker.pkg.dev/robusta-development/temporary-builds/holmes-operator:fe9e7e56 me-west1-docker.pkg.dev/robusta-development/development/holmes-operator-dev:fe9e7e56
docker push me-west1-docker.pkg.dev/robusta-development/development/holmes-operator-dev:fe9e7e56

Patch Helm values in one line (choose the chart you use):

HolmesGPT chart:

helm upgrade --install holmesgpt ./helm/holmes \
  --set registry=me-west1-docker.pkg.dev/robusta-development/development \
  --set image=holmes-dev:fe9e7e56 \
  --set operator.registry=me-west1-docker.pkg.dev/robusta-development/development \
  --set operator.image=holmes-operator-dev:fe9e7e56

Robusta wrapper chart:

helm upgrade --install robusta robusta/robusta \
  --reuse-values \
  --set holmes.registry=me-west1-docker.pkg.dev/robusta-development/development \
  --set holmes.image=holmes-dev:fe9e7e56 \
  --set holmes.operator.registry=me-west1-docker.pkg.dev/robusta-development/development \
  --set holmes.operator.image=holmes-operator-dev:fe9e7e56

@github-actions

github-actions Bot commented Feb 25, 2026 •

Copy link
Copy Markdown
Contributor

🔬 CLI Performance Benchmark

🟡 Startup Time (no LLM)

Measures holmes version execution time (imports + initialization)

Metric PR Master Change
Cold Start 10.66s 11.26s -5.3%
Warm Mean 5.06s 5.31s -4.7%
Warm Min 4.98s 5.15s
Warm Max 5.17s 5.58s

🟡 Full CLI with LLM

Measures holmes ask execution time (OpenRouter + Haiku 4.5)

Metric PR Master Change
Cold Start 17.38s 26.92s -35.4%
Warm Mean 7.15s 7.59s -5.7%
Warm Min 6.95s 7.29s
Warm Max 7.37s 7.88s

PR: fe9e7e56 | Master: 2222eff7 | Iterations: 5

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/reference/python-sdk.md`:
- Around line 90-92: The doc snippet assumes response.messages exists and calls
messages.append, which can throw if response.messages is None; update the
example around the variables response and messages (e.g., where
response.messages is read and before calling ai.call) to defensively initialize
messages = response.messages or [] (or use an explicit if/else) and then append
the new user message before passing messages into ai.call, ensuring the example
shows a safe, nil-checked pattern.

In `@holmes/core/toolset_manager.py`:
- Around line 380-387: The additional-toolset block currently may re-check
prerequisites already validated earlier; before building additional_to_check,
compute a set of names that have already been checked and exclude them (e.g.,
compare against the already-validated toolset names) so additional_to_check =
[ts for ts in all_toolsets_with_status if ts.name in {ats.name for ats in
self.additional_toolsets} and ts.enabled and ts.name not in
already_checked_names]; then call
self.check_toolset_prerequisites(additional_to_check) only if
additional_to_check is non-empty. Ensure you use the existing symbols
additional_toolsets, all_toolsets_with_status, additional_to_check and the
method check_toolset_prerequisites to locate and apply the change.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c8e4a1a and 915d1fc.

📒 Files selected for processing (4)
  • docs/installation/python-installation.md
  • docs/reference/python-sdk.md
  • holmes/config.py
  • holmes/core/toolset_manager.py

Comment thread docs/reference/python-sdk.md
Comment thread holmes/core/toolset_manager.py Outdated

@mainred mainred left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to know we support customized python toolset.

Comment thread docs/reference/python-sdk.md

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
holmes/core/toolset_manager.py (1)

367-385: ⚠️ Potential issue | 🟠 Major

Avoid duplicate prerequisite checks for additional toolsets.

additional_to_check can include toolsets already checked earlier in this method, causing duplicate prerequisite executions (including duplicate external health calls).

🔧 Suggested dedup patch
+        already_checked_names: set[str] = set()
         if using_cached:
             # Lazy initialization: only run fast config-validity checks on startup
             # (static flags and env vars). Callable and command prerequisites are
             # deferred until the first time the LLM uses a tool from the toolset.
             lazy_toolsets: List[Toolset] = []
             eager_toolsets: List[Toolset] = []
@@
             self._check_config_prerequisites(lazy_toolsets)
             if eager_toolsets:
                 self.check_toolset_prerequisites(eager_toolsets)
+                already_checked_names.update(ts.name for ts in eager_toolsets)
         else:
             self.check_toolset_prerequisites(enabled_toolsets_from_cache)
+            already_checked_names.update(
+                ts.name for ts in enabled_toolsets_from_cache
+            )
@@
-        # Additional Python toolsets passed programmatically are not cached,
-        # so always check their prerequisites.
+        # Additional Python toolsets should run full prerequisite checks on each load,
+        # but skip toolsets already checked in this execution path.
         if self.additional_toolsets:
+            additional_names = {ats.name for ats in self.additional_toolsets}
             additional_to_check = [
                 ts for ts in all_toolsets_with_status
-                if ts.name in {ats.name for ats in self.additional_toolsets} and ts.enabled
+                if ts.enabled
+                and ts.name in additional_names
+                and ts.name not in already_checked_names
             ]
-            self.check_toolset_prerequisites(additional_to_check)
+            if additional_to_check:
+                self.check_toolset_prerequisites(additional_to_check)

Also applies to: 409-417

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@holmes/core/toolset_manager.py` around lines 367 - 385, The code is running
duplicate prerequisite checks because toolsets in additional_to_check may
already be in the lists passed to _check_config_prerequisites /
check_toolset_prerequisites; deduplicate before invoking these functions by
filtering additional_to_check against already-seen toolsets (use a stable unique
key such as toolset.id or (toolset.name, toolset.type) to identify toolsets),
then only call _check_config_prerequisites and check_toolset_prerequisites with
the filtered lists (apply the same dedupe logic where
eager_toolsets/lazy_toolsets are combined with additional_to_check in both the
startup branch and the later branch around check_toolset_prerequisites).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@holmes/core/toolset_manager.py`:
- Around line 367-385: The code is running duplicate prerequisite checks because
toolsets in additional_to_check may already be in the lists passed to
_check_config_prerequisites / check_toolset_prerequisites; deduplicate before
invoking these functions by filtering additional_to_check against already-seen
toolsets (use a stable unique key such as toolset.id or (toolset.name,
toolset.type) to identify toolsets), then only call _check_config_prerequisites
and check_toolset_prerequisites with the filtered lists (apply the same dedupe
logic where eager_toolsets/lazy_toolsets are combined with additional_to_check
in both the startup branch and the later branch around
check_toolset_prerequisites).

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 915d1fc and 8d5f15d.

📒 Files selected for processing (2)
  • holmes/core/toolset_manager.py
  • mkdocs.yml

@aantn
aantn enabled auto-merge (squash) March 2, 2026 09:15
claude and others added 4 commits March 2, 2026 09:18
Track which toolset names were already checked by the cache and CLI
paths, and only run check_toolset_prerequisites on additional toolsets
that weren't covered.

https://claude.ai/code/session_01RuoZoiEtUGjL4MnxDec572
Signed-off-by: Claude <noreply@anthropic.com>
@aantn
aantn merged commit 836882c into master Mar 2, 2026
18 of 22 checks passed
@aantn
aantn deleted the claude/update-python-sdk-docs-h8iPW branch March 2, 2026 09:26
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.

4 participants