From dd39fa2e94b3dbcf42c3fb075d7436c91b388a1e Mon Sep 17 00:00:00 2001 From: PeninsulaInd Date: Thu, 19 Feb 2026 21:44:41 -0600 Subject: [PATCH] Show tool call args in chat and raise max iterations to 15 - Display tool arguments in the calling indicator so user can see what each tool call is doing (e.g. Calling delegate_task(prompt='...')...) - Bump MAX_TOOL_ITERATIONS from 5 to 15 for complex chat interactions Co-Authored-By: Claude Opus 4.6 --- cheddahbot/agent.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/cheddahbot/agent.py b/cheddahbot/agent.py index 4bbd86f..76d2c4e 100644 --- a/cheddahbot/agent.py +++ b/cheddahbot/agent.py @@ -16,7 +16,7 @@ from .router import build_system_prompt, format_messages_for_llm log = logging.getLogger(__name__) -MAX_TOOL_ITERATIONS = 5 +MAX_TOOL_ITERATIONS = 15 _IMAGE_MIME = { ".png": "image/png", @@ -250,9 +250,17 @@ class Agent: ) for i, tc in enumerate(unique_tool_calls): - yield f"\n\n*Calling {tc['name']}...*\n" + args = tc.get("input", {}) + # Build a brief summary of the args for the user + arg_summary = ", ".join( + f"{k}={repr(v)[:60]}" for k, v in args.items() + ) + if arg_summary: + yield f"\n\n*Calling {tc['name']}({arg_summary})...*\n" + else: + yield f"\n\n*Calling {tc['name']}...*\n" try: - result = self._tools.execute(tc["name"], tc.get("input", {})) + result = self._tools.execute(tc["name"], args) except Exception as e: result = f"Tool error: {e}" log.info("Tool %s result: %s", tc["name"], result[:500])