I’m encountering an issue with task context resolution in CrewAI. I’m using version 0.76.9. When a task references another task in its context list, if appears to be causing configuration processing errors.
Example Config
assign_experts:
description: >
Sample description
expected_output: >
Sample expected output
agent: expert_picker
output_file: assigned_tasks.yaml
context:
- collect_tasks
collect_tasks:
description: >
Sample description
expected_output: >
Sample expected output
agent: task_picker
Current Behavior
When processing the context list in crew_base.py
, the code immediately instantiates referenced tasks, which causes a second process_config
call that tries to process the agent name string as configuration data.
The exact error I get is AttributeError: 'str' object has no attribute 'get'
which is triggered because the string “collect_tasks” is being referenced as if its a config dictionary.
Is this a bug or am I doing this wrong?
Thanks!