# CrewAI Agents Use Old or Incorrect Input Despite Memory Reset and Cache Clear

**URL:** <https://community.crewai.com/t/crewai-agents-use-old-or-incorrect-input-despite-memory-reset-and-cache-clear/5484>\
**Category:** CrewAI Community Support\
**Created:** [April 24, 2025, 11:51am UTC](https://community.crewai.com/t/crewai-agents-use-old-or-incorrect-input-despite-memory-reset-and-cache-clear/5484 "2025-04-24T11:51:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sy\_kalyan](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/sy_kalyan/32/3488_2.png) [@sy\_kalyan](https://community.crewai.com/u/sy_kalyan)\
**Post date:** [April 24, 2025, 11:51am UTC](https://community.crewai.com/t/crewai-agents-use-old-or-incorrect-input-despite-memory-reset-and-cache-clear/5484/1 "2025-04-24T11:51:31Z")

</div>

**Summary**  
I’m developing a multi-agent audit system using CrewAI, where one agent validates transaction dates via a custom tool.  
The transaction dates and current date are passed dynamically at runtime via the CLI.  
However, CrewAI agents ignore these runtime values and instead behave as if using previous inputs —  
even after all known cache and memory reset techniques are applied.

Without changing the code or the data:

- The agent sometimes receives \*\* incorrect transaction dates\*\* .
- The agent sometimes uses **old values of `current_date`**.(current\_date basically describes that day’s date)
- These dates **do not match the actual values passed at runtime** through the `kickoff(inputs={...})` call.
- In `main.py`, both `transaction_dates` and `current_date` are passed correctly into the `.kickoff()` method. Print statements confirm that these values are intact when received in `crew.py`. However, **when the agent invokes the custom tool** , the dates received inside the tool’s `_run()` method are **incorrect or appear to be from a previous run** , suggesting unexpected caching or memory persistence.
- Even after resetting memory and deleting all storage folders, the issue **randomly reoccurs**.

### ✅ What Should Happen

Every time the system runs:

- The `transaction_dates` and `current_date` passed into `.kickoff()` should be the **only values** used.
- The custom tool should only validate against these passed values.
- There should be **no memory** of prior runs, prior templates, or previously cached inputs.

🛠 What I’ve Already Tried  
**Memory Reset**  
crewai reset-memories --all  
my\_crew.reset\_memories(command\_type=“all”) (in code)  
**Manual Folder Cleanup**  
Deleted crewai\_storage/knowledge, short\_term/, entities/, \*.db files  
Deleted all **pycache** folders  
**Renamed the tool**  
Changed class name to DateVerificationTool\_Fresh to force reinitialization  
**UUID Injection Debugging**  
Added UUID to transaction\_dates to detect if wrong values were used  
Confirmed ghost values were still making it to the tool.

**Key Questions**

1. Are there any other memory/cache mechanisms CrewAI might use outside of CREWAI\_STORAGE\_DIR?  
2.Could embeddings or internal caching override or ignore inputs passed to kickoff()?  
3,Are .yaml task files fully reloaded on every run, or cached somehow?  
4.Is there a way to force a fresh parse of every .yaml and custom tool on every run?  
5.Could some background memory from an LLM agent interfere even if memory=True is not set?

result = CrewaiFaudit().crew().kickoff(inputs={  
“input\_data”: data,  
“transaction\_dates”: transaction\_dates\_list,  
“date”:data[“date”]  
})  
where i am giving transaction\_dates and date as inputs for an agent and input\_data as an input for another agent . i wrapped all the keys in {{ }} . the agent whose input is given {{ input\_data }} is correctly able to pick the data in input\_data and the other agent who i gave the other two keys (basically keys) are not picking the data correctly .

data consists of a dictionary like below : {  
“opening\_balance”: ob,  
“sanctioned\_funds”: sf,  
“closing\_balance”: cb,  
“transactions”: txns,  
“date”: date  
}  
and transaction\_dates\_list = [txn[“Date”] for txn in data[“transactions”]] and date is date = datetime.now().strftime(“%Y-%m-%d”)

an example of how the data disctionary is:

{  
“opening\_balance”: 1000.0,  
“sanctioned\_funds”: 2000.0,  
“closing\_balance”: 2150.0,  
“transactions”: [  
{  
“Date”: “2025-04-30”,  
“Description”: “Opening Balance”,  
“Amount”: 1000.0,  
“Balance”: 1000.0  
},  
{  
“Date”: “2025-05-01”,  
“Description”: “Salary”,  
“Amount”: 2000.0,  
“Balance”: 3000.0  
},  
{  
“Date”: “2025-05-03”,  
“Description”: “Rent”,  
“Amount”: -800.0,  
“Balance”: 2200.0  
},  
{  
“Date”: “2025-05-05”,  
“Description”: “Grocery”,  
“Amount”: -150.0,  
“Balance”: 2050.0  
},  
{  
“Date”: “2025-05-10”,  
“Description”: “Transfer In”,  
“Amount”: 300.0,  
“Balance”: 2350.0  
},  
{  
“Date”: “2025-05-15”,  
“Description”: “Utilities”,  
“Amount”: -200.0,  
“Balance”: 2150.0  
}  
],  
“date”: “2025-04-24”  
}

Please help me here . i am stuck at this for a couple of days

---

<div class="post-metadata">

**Author:** ![Logan\_Grieser](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/logan_grieser/32/3335_2.png) [@Logan\_Grieser](https://community.crewai.com/u/Logan_Grieser)\
**Post date:** [May 8, 2025, 1:48pm UTC](https://community.crewai.com/t/crewai-agents-use-old-or-incorrect-input-despite-memory-reset-and-cache-clear/5484/2 "2025-05-08T13:48:04Z")

</div>

I’m having a similar issue with my crew using data from a knowledge source that has since been removed. I’m resetting memory on every kickoff and it’s still using the old data.

---

<div class="post-metadata">

**Author:** ![Saurabh\_Mahra](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/saurabh_mahra/32/3851_2.png) [@Saurabh\_Mahra](https://community.crewai.com/u/Saurabh_Mahra)\
**Post date:** [June 4, 2025, 8:09pm UTC](https://community.crewai.com/t/crewai-agents-use-old-or-incorrect-input-despite-memory-reset-and-cache-clear/5484/3 "2025-06-04T20:09:59Z")

</div>

Same error. Could this be happening because I am using FastAPI? I am restarting the uvicorn server, but it does not help.

I have made significant changes to my agents.yaml and tasks.yaml but when the crew().kickoff(inputs) is triggered, I see older definitions (agent roles, task descriptions) still being used.

Someone, please help. I have wasted a lot of time debugging this.
