Fix human feedback final answer visibility - #6094
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughWhen ChangesHuman-input feedback result visibility
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
This PR is stale because it has been open for 45 days with no activity. |
Summary
Fixes #6072.
When
human_input=Trueis active, CrewAI now marks final-answer log events as visible even if the agent and crew are non-verbose. That ensures the human feedback prompt's "Final Result above" instruction has an actual final answer above it.This is intentionally limited to
AgentFinishevents so intermediate tool/action logs still respect the existing verbose gate.Tests
uv run pytest lib/crewai/tests/agents/test_agent_executor.py lib/crewai/tests/agents/test_async_agent_executor.py -k "show_logs_displays_final_answer_for_human_input or show_logs_keeps_non_final_human_input_logs_non_verbose"uv run ruff check --no-fix lib/crewai/src/crewai/experimental/agent_executor.py lib/crewai/src/crewai/agents/crew_agent_executor.py lib/crewai/tests/agents/test_agent_executor.py lib/crewai/tests/agents/test_async_agent_executor.pyuv run ruff format --check lib/crewai/src/crewai/experimental/agent_executor.py lib/crewai/src/crewai/agents/crew_agent_executor.py lib/crewai/tests/agents/test_agent_executor.py lib/crewai/tests/agents/test_async_agent_executor.pyNote: running the full
test_agent_executor.pyfile in this local environment also hit unrelated optional-dependency/input-prompt failures for missingcrewai[anthropic]andexa_py.Summary by CodeRabbit
Bug Fixes
Tests