Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fixing bug that prevented passing a null available_tools list. Withou…
…t being able to set a null list, the default 14 tools that the cli ships with are present. Sometimes you need toolless calls. Same pattern exists on the excluded_tools variable. From a quick look, there are a lot of incorrect null checks that should be tighterned up. I don't know what the functional impact is, so sticking with the case that is causing a known bug.
  • Loading branch information
Ben Appleby authored and Ben Appleby committed Feb 16, 2026
commit d6618f2a667897af365aef303d968a96a77147a0
4 changes: 2 additions & 2 deletions python/copilot/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,10 +464,10 @@ async def create_session(self, config: Optional[SessionConfig] = None) -> Copilo

# Add tool filtering options
available_tools = cfg.get("available_tools")
if available_tools:
if available_tools is not None:
payload["availableTools"] = available_tools
excluded_tools = cfg.get("excluded_tools")
if excluded_tools:
if excluded_tools is not None:
payload["excludedTools"] = excluded_tools
Comment on lines 466 to 471
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

This change fixes the empty-list case for available_tools/excluded_tools, but there isn’t a regression test that asserts an explicit empty list is preserved and results in a toolless request. Consider adding an E2E test case (similar to test_should_create_a_session_with_availableTools) that calls create_session({"available_tools": []}) and verifies the recorded request contains no tools.

Copilot generated this review using guidance from repository custom instructions.

# Enable permission request callback if handler provided
Expand Down