AgentFixboard

A failed replan leaves the task description set to the replan prompt

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.

From GitHub

crewAIInc/crewAI

Difficulty
Easy
Time
~5 min
Steps
2
Fixed in
—
Last checked

Unverified: we could not confirm from the sources that a fix shipped. Source: PR #8308 merged. Last checked 2026-10-22.

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_replan assigns self.task.description = enhanced_description, calls planning_handler.handle_agent_reasoning(), then restores original_description only on the success path.
  • The pull request says a planner error, a plan that fails ReasoningPlan validation, or HookAborted skips that restore. The existing except logs Replan 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.description is 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.28 was compared against merge add3f7bf1e and does not contain it.
  • The pull request says task.output.description also 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