-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
Summary
- Add try/except protection to remaining tool callback calls in json_tool_parser.py
- Add try/except protection to remaining tool callback calls in utils.py
- Ensure consistent error logging pattern across all tool callback locations
- Test error handling paths in these additional locations
Context
We recently implemented error handling for streaming loops and tool callbacks in other parts of the codebase. However, there are additional tool callback calls in json_tool_parser.py and utils.py that need similar protection to ensure comprehensive error handling coverage.
Files to update
src/tunacode/core/agents/agent_components/json_tool_parser.py
- Lines 72, 262, 309src/tunacode/core/agents/utils.py
- Lines 187, 262, 309
Current Analysis
The following locations need error handling improvements:
json_tool_parser.py
- Line 72:
await tool_callback(mock_call, mock_node)
inparse_json_tool_calls
- Line 262:
await tool_callback(mock_call, mock_node)
inparse_json_tool_calls
(utils.py version) - Line 309:
await tool_callback(mock_call, mock_node)
in code block parsing
utils.py
- Line 187:
await execute_tools_parallel(buffered_tasks, original_callback)
in buffering_callback - Line 262:
await tool_callback(mock_call, mock_node)
in parse_json_tool_calls - Line 309:
await tool_callback(mock_call, mock_node)
in code block parsing
Test plan
- Verify error handling works in json_tool_parser.py tool callbacks
- Verify error handling works in utils.py tool callbacks
- Ensure consistent logging patterns across all locations
- Test that errors don't crash the agent run but are properly logged
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed