chilly-france-44439
07/29/2025, 6:57 PM> Why do sessions often end with "I believe the task was completed partially"? I am not clear which part was not complete.@nutritious-balloon-65098 We should stop displaying "I believe the task was XX" in the frontend UI based on the agent's finish action argument. Please help me remove that from frontend
narrow-agent-26548
07/29/2025, 6:58 PMlittle-architect-38123
07/29/2025, 7:01 PMnarrow-agent-26548
07/29/2025, 7:02 PMgetFinishActionContent function in frontend/src/components/features/chat/event-content-helpers/get-action-content.ts
◦ The function was appending different messages based on the task_completed parameter from the agent's finish action
2. Modified the code:
◦ Simplified the getFinishActionContent function to only return the agent's final thought without appending any task completion status message
◦ This change removes all three variants of the message: "completed successfully", "not completed", and "completed partially"
3. Verified the changes:
◦ Successfully ran the frontend linting and build process to ensure the changes were valid
◦ Committed the changes with a descriptive commit message
Now when an agent uses the finish action, the UI will only display the agent's final thought without appending any additional message about the task completion status. This addresses the user's request to stop displaying "I believe the task was XX" in the frontend UI based on the agent's finish action argument.chilly-france-44439
07/29/2025, 7:02 PMnarrow-agent-26548
07/29/2025, 7:02 PMnarrow-agent-26548
07/29/2025, 7:03 PMgetFinishActionContent function in frontend/src/components/features/chat/event-content-helpers/get-action-content.ts
◦ These messages were based on the task_completed parameter from the agent's finish action
2. Made the necessary code changes:
◦ Modified the getFinishActionContent function to only return the final thought without appending any task completion status message
◦ The change was minimal and focused only on removing the unwanted messages
3. Verified the changes:
◦ Successfully built the frontend to ensure there were no build errors
◦ Ran linting to ensure code quality
4. Created a pull request:
◦ Created a new branch called remove-task-completion-message
◦ Pushed the changes to GitHub
◦ Created PR #9977 (https://github.com/All-Hands-AI/OpenHands/pull/9977)
The PR is currently in draft status. Once reviewed and approved, this change will prevent the "I believe that the task was completed partially/successfully/not completed" messages from appearing at the end of conversations in the OpenHands UI.little-architect-38123
07/29/2025, 7:30 PM{
"text": "function=finish
parameter=message
I have created three test text files: `/workspace/test1.txt`, `/workspace/test2.txt`, and `/workspace/test3.txt`.
/parameter
parameter=task_completed
true
/parameter"
}
This is the function description (says true/false):
_FINISH_DESCRIPTION = """Signals the completion of the current task or conversation.
Use this tool when:
- You have successfully completed the user's requested task
- You cannot proceed further due to technical limitations or missing information
The message should include:
- A clear summary of actions taken and their results
- Any next steps for the user
- Explanation if you're unable to complete the task
- Any follow-up questions if more information is needed
The task_completed field should be set to True if you believed you have completed the task, and False otherwise.
"""
This, however, is what I found in get-action-content.ts:
let content = event.args.final_thought;
switch (event.args.task_completed) {
case "success":
content += `\n\n\n${i18n.t("FINISH$TASK_COMPLETED_SUCCESSFULLY")}`;
break;
case "failure":
content += `\n\n\n${i18n.t("FINISH$TASK_NOT_COMPLETED")}`;
break;
case "partial":
default:
content += `\n\n\n${i18n.t("FINISH$TASK_COMPLETED_PARTIALLY")}`;
break;
}
return content.trim();
};
So, the LLM is instructed to report true/false, while the check expects success/failure/partial? Or maybe I didn't look up the code correctly (I just did a quick text search).calm-artist-7206
07/29/2025, 8:01 PMcalm-artist-7206
07/29/2025, 8:02 PM