Skip to content

fix: display agent result when human_input=True regardless of verbose setting#6169

Open
tcconnally wants to merge 1 commit into
crewAIInc:mainfrom
Perseus-Computing-LLC:fix/human-input-display-without-verbose
Open

fix: display agent result when human_input=True regardless of verbose setting#6169
tcconnally wants to merge 1 commit into
crewAIInc:mainfrom
Perseus-Computing-LLC:fix/human-input-display-without-verbose

Conversation

@tcconnally

@tcconnally tcconnally commented Jun 15, 2026

Copy link
Copy Markdown

Problem

When human_input=True but verbose=False, CrewAI shows the "Provide feedback on the Final Result above" prompt but the result was never displayed. The operator is asked to approve output they cannot see.

Root Cause

crew_agent_executor.py::_show_logs gates the result rendering on agent.verbose or crew.verbose, but the human feedback gate fires purely on human_input=True with no relationship to verbose.

Fix

Added ask_for_human_input to the verbose check in _show_logs. When human_input is active, the result is always displayed regardless of the verbose setting.

Before

verbose=self.agent.verbose
or (hasattr(self, "crew") and getattr(self.crew, "verbose", False)),

After

verbose=self.agent.verbose
or (hasattr(self, "crew") and getattr(self.crew, "verbose", False))
or getattr(self, "ask_for_human_input", False),

Testing

Minimal reproduction from the issue (#6072):

from crewai import Agent, Crew, Task, Process
from crewai.llms.base_llm import BaseLLM

class StubLLM(BaseLLM):
    def call(self, messages, tools=None, callbacks=None, 
             available_functions=None, from_task=None, 
             from_agent=None, response_model=None):
        return "Thought: I know it.\nFinal Answer: The sky is blue."
    def supports_function_calling(self) -> bool:
        return False

agent = Agent(role="Tester", goal="Minimal Repro", backstory="bg",
              llm=StubLLM(model="stub"), verbose=False)
task = Task(description="Sky colour?", expected_output="a colour",
            agent=agent, human_input=True)
Crew(agents=[agent], tasks=[task], process=Process.sequential, verbose=False).kickoff()

Before fix: shows feedback prompt but no result.
After fix: result is displayed before the feedback prompt.

Closes #6072

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Agent execution logs now display with proper verbosity when human input mode is enabled on the executor, in addition to existing crew and agent verbose configuration settings.

When human_input=True but verbose=False, CrewAI shows the
'Provide feedback on the Final Result above' prompt but the
result was never displayed. The _show_logs method gated the
result rendering on agent.verbose or crew.verbose, but the
human feedback gate fires purely on human_input=True.

This fix adds ask_for_human_input to the verbose check so
results are always displayed when human feedback is required.

Closes crewAIInc#6072
@coderabbitai

coderabbitai Bot commented Jun 15, 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: e4e12d88-13a7-4a94-b1c8-251fc7fdbdc8

📥 Commits

Reviewing files that changed from the base of the PR and between a5cc6f6 and a5bbee3.

📒 Files selected for processing (1)
  • lib/crewai/src/crewai/agents/crew_agent_executor.py

📝 Walkthrough

Walkthrough

In crew_agent_executor.py, the _show_logs method's verbose field for AgentLogsExecutionEvent is updated to also evaluate True when self.ask_for_human_input is set, in addition to the existing agent and crew verbosity checks.

Changes

Human Input Verbose Fix

Layer / File(s) Summary
Include ask_for_human_input in verbose condition
lib/crewai/src/crewai/agents/crew_agent_executor.py
The verbose argument passed to AgentLogsExecutionEvent inside _show_logs now ORs self.ask_for_human_input with the existing agent.verbose or crew.verbose check, so the agent's final answer is emitted before the human feedback prompt even when both verbose flags are False.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A rabbit hopped up, squinting at the screen,
"The answer was there, but never was seen!"
One boolean or and the fix was complete,
The Final Result now precedes the prompt's greet. 🐇✅
No more asking feedback on invisible text!

🚥 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 directly describes the main fix: displaying agent results when human_input=True despite verbose=False, which matches the primary change in crew_agent_executor.py.
Linked Issues check ✅ Passed The PR fully addresses issue #6072 by modifying _show_logs to include ask_for_human_input in the verbose check, ensuring results display when human feedback is requested regardless of verbose setting.
Out of Scope Changes check ✅ Passed The changes are focused solely on fixing the root cause in crew_agent_executor.py::_show_logs and directly address the objectives specified in issue #6072.
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 and usage tips.

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