Skip to content

fix: show task result before human feedback prompt (#6072)#6335

Open
C1-BA-B1-F3 wants to merge 1 commit into
crewAIInc:mainfrom
C1-BA-B1-F3:fix/human-input-feedback-6072-v2
Open

fix: show task result before human feedback prompt (#6072)#6335
C1-BA-B1-F3 wants to merge 1 commit into
crewAIInc:mainfrom
C1-BA-B1-F3:fix/human-input-feedback-6072-v2

Conversation

@C1-BA-B1-F3

@C1-BA-B1-F3 C1-BA-B1-F3 commented Jun 25, 2026

Copy link
Copy Markdown

Fixes #6072

Problem

When human_input=True is set on a task, the feedback prompt says "Provide feedback on the Final Result above" but the result is never actually displayed — it only appears when verbose=True. This leaves users unable to see what they're supposed to give feedback on.

Fix

Added a _show_result() method to SyncHumanInputProvider that displays the agent's result in a Rich panel before prompting for feedback. This is called in:

  1. handle_feedback / handle_feedback_async — shows the initial result before the first feedback prompt
  2. _handle_regular_feedback / _handle_regular_feedback_async — shows updated results after each feedback iteration, before prompting again

The result is now always visible regardless of the verbose setting, so users can make informed feedback decisions.

Summary by CodeRabbit

  • New Features
    • The current task result is now shown before asking for human feedback, making it easier to review the agent’s output.
    • Feedback rounds now consistently display the latest result each time additional input is requested, in both sync and async flows.

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 601cb6f5-be64-4757-8a08-cd9d0e9063dd

📥 Commits

Reviewing files that changed from the base of the PR and between 01fc389 and e7920ca.

📒 Files selected for processing (1)
  • lib/crewai/src/crewai/core/providers/human_input.py

📝 Walkthrough

Walkthrough

The human input provider now prints the current agent result before the first feedback prompt and before subsequent feedback rounds in both sync and async flows. A helper was added to render the formatted result in a Rich panel.

Changes

Human feedback result display

Layer / File(s) Summary
Result rendering helper
lib/crewai/src/crewai/core/providers/human_input.py
Adds _show_result to print the formatted task result in a Rich panel titled “📕 Task Result”.
Initial feedback prompt
lib/crewai/src/crewai/core/providers/human_input.py
The sync and async feedback entry points show the current result before prompting for the first human response.
Repeated feedback prompt
lib/crewai/src/crewai/core/providers/human_input.py
The sync and async regular-feedback loops show the latest result before requesting the next feedback round.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: showing the task result before the human feedback prompt.
Linked Issues check ✅ Passed The change surfaces the task result during human-input prompts in both sync and async flows, meeting #6072's requirement.
Out of Scope Changes check ✅ Passed The diff is limited to the human input provider and directly supports the linked bug fix with no unrelated changes.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@corridor-security corridor-security Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary: This PR displays task results in the existing human feedback flow before prompting for user feedback. No exploitable security vulnerabilities were identified in the added code.

Risk: Low risk. The change only affects local/interactive result presentation and does not introduce new authentication, authorization, data access, external request, or file/system execution paths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] human_input=True: the feedback prompt references a "Final Result above" that is never displayed unless verbose=True

1 participant