8000 fix: ensure completion tool output is recorded and all tool results are captured by tusharmath · Pull Request #874 · antinomyhq/forge · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: ensure completion tool output is recorded and all tool results are captured #874

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 30, 2025

Conversation

tusharmath
Copy link
Collaborator
@tusharmath tusharmath commented May 30, 2025

Summary

This fix addresses a critical bug where the completion tool output was not being properly recorded, and tool call results were being conditionally skipped. The changes ensure all tool call results are captured for proper system functionality, particularly for the compaction process that relies on complete tool call history.

Bug Description

The system was missing completion tool outputs and conditionally skipping tool call result recording when tasks were marked as complete. This caused incomplete tool call history and potentially broken compaction functionality.

Key Fixes

  • Missing completion output: Updated completion tool to return proper feedback message instead of missing output
  • Conditional recording bug: Removed faulty logic that was skipping completed tool call records, ensuring all results are captured
  • Method clarity: Renamed get_all_tool_resultsexecute_tool_calls to better reflect the actual behavior
  • Debug logging: Fixed logging to show actual tool call count instead of incorrect boolean value

Technical Impact

  • Fixes compaction functionality by ensuring complete tool call history is maintained
  • Resolves missing completion tool feedback in the system
  • Ensures consistent tool result recording regardless of completion status
  • Improves debugging with accurate tool call count reporting

Root Cause

The conditional logic if !tool_context.get_complete().await was incorrectly preventing completed tool calls from being recorded, and the completion tool was not returning any output message.

Testing

  • All existing tests pass
  • Tool call execution now properly records all results
  • Completion tool provides consistent user feedback

…ty and ensure all tool call results are recorded
@tusharmath tusharmath changed the title refactor: rename get_all_tool_results to execute_tool_calls for clarity and ensure all tool call results are recorded refactor: improve tool call execution and ensure complete result recording May 30, 2025
Copy link
openhands-ai bot commented May 30, 2025

Looks like there are a few issues preventing this PR from being merged!

  • GitHub Actions are failing:
    • ci

If you'd like me to help, just leave a comment, like

@OpenHands please fix the failing actions on PR #874

Feel free to include any additional details that might help me get this PR into a better state.

You can manage your notification settings

@tusharmath tusharmath changed the title refactor: improve tool call execution and ensure complete result recording fix: ensure completion tool output is recorded and all tool results are captured May 30, 2025
@tusharmath tusharmath merged commit 524469c into main May 30, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0