Skip to content

fix(repl): use list_tools() in /tools and /context handlers - #162

Merged
ericleepi314 merged 1 commit into
mainfrom
worktree-tools-slash
May 17, 2026
Merged

fix(repl): use list_tools() in /tools and /context handlers#162
ericleepi314 merged 1 commit into
mainfrom
worktree-tools-slash

Conversation

@ericleepi314

Copy link
Copy Markdown
Collaborator

Summary

  • /tools crashed with AttributeError: 'ToolRegistry' object has no attribute 'list_specs'ToolRegistry exposes list_tools(), not list_specs(). Every other call site in the codebase already uses list_tools() (e.g. src/tui/commands.py:167, src/tool_system/agent_loop.py:311, src/entrypoints/tui.py:231).
  • Fixed the same latent bug at src/repl/core.py:1998 in the /context handler — it would have crashed identically when invoked.
  • Added a regression test (test_handle_command_tools_lists_registered_tools) so a future rename doesn't reintroduce this.

Repro (before)

> /tools
AttributeError: 'ToolRegistry' object has no attribute 'list_specs'
  at src/repl/core.py:1905

Test plan

  • New regression test passes: pytest tests/test_repl.py::TestREPL::test_handle_command_tools_lists_registered_tools
  • Manual: /tools now prints the bullet-listed tool names
  • No other call sites of list_specs remain (grep -rn list_specs src/ tests/ → empty)

🤖 Generated with Claude Code

The /tools slash command crashed with AttributeError because
ToolRegistry exposes list_tools(), not list_specs(). The /context
handler had the same latent bug. Adds a regression test for /tools.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@ericleepi314
ericleepi314 merged commit 37a71e4 into main May 17, 2026
singlaamitesh pushed a commit to singlaamitesh/clawcodex that referenced this pull request Jul 7, 2026
…s-slash

fix(repl): use list_tools() in /tools and /context handlers
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.

1 participant