Convert tool execution exceptions into repairable tool errors instead of crashing monologue #75
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nsaspy/a0-symbolics#75
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Defense-in-depth follow-up to #69.
In
agent.py:1203andagent.py:1483the callresponse = await tool.execute(**tool_args)is wrapped only intry/finally— any exception (KeyError, ValueError, third-party bugs) bubbles tohandle_exception()which re-raises and kills the monologue loop.Suggested fix
Wrap with
except Exception as e:returningResponse(message=f"Tool {tool_name} failed: {e}", break_loop=False)so the model can repair its arguments on the next iteration. This single change converts every tool-arg crash class into a recoverable error.