Symptom
When planning is on and a replan raises, task.description stays set to the internal replan prompt. The run continues; the original description is gone.
Evidence what you'll see
AgentExecutor._trigger_replanassignsself.task.description = enhanced_description, callsplanning_handler.handle_agent_reasoning(), then restoresoriginal_descriptiononly on the success path.- The pull request says a planner error, a plan that fails
ReasoningPlanvalidation, orHookAbortedskips that restore. The existingexceptlogsReplan failed: ...and keeps the old todos. - The report's stand-in task starts as
What is the capital of France?.
Why it happens
The restore of task.description was not in a finally, so any exception from handle_agent_reasoning() left the replan prompt in place. Pull request 8308 moves the restore into finally.
Affected versions
Agents with PlanningConfig and max_replans set. The linked issue does not name a released crewAI version or an operating system. The reproduction uses a mocked planner failure.
Fix steps
0 of 2 done
Your check marks stay in this browser only.
How to check it worked
- After a planner call that raises,
task.descriptionis still the original text (in the report,What is the capital of France?), not the replan prompt.
If it still fails
- No published release tag contains pull request 8308. Tag
1.15.28was compared against mergeadd3f7bf1eand does not contain it. - The pull request says
task.output.descriptionalso showed the replan prompt and carried into later runs on the unfixed tree.
Sources and credit
Summarized in our own words from these public reports. Credit goes to their authors.
Provided as is, without warranty. Try changes in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change
Hit an error we don't cover? Submit it