# Crew Memory is broken

**URL:** <https://community.crewai.com/t/crew-memory-is-broken/841>\
**Category:** General\
**Tags:** crewai\
**Created:** [October 16, 2024, 7:57pm UTC](https://community.crewai.com/t/crew-memory-is-broken/841 "2024-10-16T19:57:33Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![albert\_pinto](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/albert_pinto/32/589_2.png) [@albert\_pinto](https://community.crewai.com/u/albert_pinto)\
**Post date:** [October 16, 2024, 7:57pm UTC](https://community.crewai.com/t/crew-memory-is-broken/841/1 "2024-10-16T19:57:33Z")

</div>

**This line of code memory =True breaks.**  
@crew  
def crew(self) → Crew:  
“”“Creates the CollegeEssayVersion2 crew”“”  
return Crew(  
agents=[self.essay\_generator()],  
tasks=self.tasks  
process=Process.hierarchical,  
manager\_agent=self.critic\_reviewer(),  
**memory=True,**  
verbose=True,  
)

```
| File "<frozen os>", line 225, in makedirs
| OSError: [Errno 36] File name too long: "/home/albert/.local/share/college_essay_version2/short_term/You_are_an_experienced_college_application_essay_writer. __Your_task_is_to_craft_a_400-word_essay_with_an_original_story_for_the_{program}_application,__ using_only_the_information_provided_in_{file_content}. __Incorporate_creativity,_sincerity,_and_logic_into_the_essay,_and_feel_free_to_include_the_person_{student}_as_a_central_figure_in_the_narrative.__ The_essay_should_have_a_clear_heading_(featuring_{student}'s_name)_and_a_well-rounded_conclusion._You_will_use_four_Personal_Insight_Questions_(PIQs)_from_the_{college}_that_you_deem_most_relevant_to_the_essay_using_the_{file_content}."

```

---

<div class="post-metadata">

**Author:** ![thais.costa](https://avatars.discourse-cdn.com/v4/letter/t/db5fbb/32.png) [@thais.costa](https://community.crewai.com/u/thais.costa)\
**Post date:** [January 15, 2025, 8:01pm UTC](https://community.crewai.com/t/crew-memory-is-broken/841/2 "2025-01-15T20:01:47Z")

</div>

Hello, I am having the same issue. Did you solve this?  
Thanks in advance

---

<div class="post-metadata">

**Author:** ![Brandon\_Hancock](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/brandon_hancock/32/2051_2.png) [@Brandon\_Hancock](https://community.crewai.com/u/Brandon_Hancock)\
**Post date:** [January 15, 2025, 8:44pm UTC](https://community.crewai.com/t/crew-memory-is-broken/841/3 "2025-01-15T20:44:50Z")

</div>

Hey @albert_pinto! Which version of CrewAI are you using?

We introduced a fix for this issue in early December.

---

<div class="post-metadata">

**Author:** ![kenpachi](https://avatars.discourse-cdn.com/v4/letter/k/87869e/32.png) [@kenpachi](https://community.crewai.com/u/kenpachi)\
**Post date:** [April 14, 2025, 8:14am UTC](https://community.crewai.com/t/crew-memory-is-broken/841/4 "2025-04-14T08:14:36Z")

</div>

Hello, any news about this issue ?

---

<div class="post-metadata">

**Author:** ![maxmoura](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/maxmoura/32/4206_2.png) [@maxmoura](https://community.crewai.com/u/maxmoura)\
**Post date:** [April 14, 2025, 8:19am UTC](https://community.crewai.com/t/crew-memory-is-broken/841/5 "2025-04-14T08:19:20Z")

</div>

Hey @kenpachi!

Could you give us a bit more context about the issue you’re running into with Memory?

---

<div class="post-metadata">

**Author:** ![kenpachi](https://avatars.discourse-cdn.com/v4/letter/k/87869e/32.png) [@kenpachi](https://community.crewai.com/u/kenpachi)\
**Post date:** [April 14, 2025, 8:27am UTC](https://community.crewai.com/t/crew-memory-is-broken/841/6 "2025-04-14T08:27:35Z")

</div>

Yes,  
I wanted to add short term memory in my crew so i did all the config as explained in the doc but when I run it, I get this error : FileNotFoundError: [WinError 206] The filename or extension is too long. because it concat all the agent roles to make the file name. So my file name is too long.

this is my config :  
short\_term\_memory=ShortTermMemory(  
storage=RAGStorage(  
embedder\_config=EMBEDDER\_CONFIG,  
type=“short\_term”,  
path=“src/csc\_flow\_analyzer/data/”,  
)  
),

---

<div class="post-metadata">

**Author:** ![kenpachi](https://avatars.discourse-cdn.com/v4/letter/k/87869e/32.png) [@kenpachi](https://community.crewai.com/u/kenpachi)\
**Post date:** [April 14, 2025, 9:01am UTC](https://community.crewai.com/t/crew-memory-is-broken/841/7 "2025-04-14T09:01:28Z")

</div>

I saw that i could edit regedit by enabling long path but i’m working on a professional project and i don’t have admin rights. So if you find any solution it would be great

---

<div class="post-metadata">

**Author:** ![maxmoura](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/maxmoura/32/4206_2.png) [@maxmoura](https://community.crewai.com/u/maxmoura)\
**Post date:** [April 14, 2025, 11:06am UTC](https://community.crewai.com/t/crew-memory-is-broken/841/8 "2025-04-14T11:06:01Z")

</div>

> [@kenpachi](#):
>
> FileNotFoundError: [WinError 206] The filename or extension is too long

As a temporary and local workaround, try adjusting the `MAX_FILE_NAME_LENGTH` value in `crewai/utilities/constants.py` within your CrewAI installation.

Set it to a value that works for your operating system (but don’t make it too small).

---

<div class="post-metadata">

**Author:** ![kenpachi](https://avatars.discourse-cdn.com/v4/letter/k/87869e/32.png) [@kenpachi](https://community.crewai.com/u/kenpachi)\
**Post date:** [April 14, 2025, 11:19am UTC](https://community.crewai.com/t/crew-memory-is-broken/841/9 "2025-04-14T11:19:04Z")

</div>

I tried but still the same error.  
does it matter if it’s a flow instead of a simple crew ?

this is the more complete log error

os.makedirs(os.path.dirname(self._db\_file), exist\_ok=True)  
File “\< frozen os \>”, line 225, in makedirs  
FileNotFoundError: [WinError 206] The filename or extension is too long: 'agent\_role\_1\_agent\_role\_2_…’

---

<div class="post-metadata">

**Author:** ![kenpachi](https://avatars.discourse-cdn.com/v4/letter/k/87869e/32.png) [@kenpachi](https://community.crewai.com/u/kenpachi)\
**Post date:** [April 14, 2025, 11:34am UTC](https://community.crewai.com/t/crew-memory-is-broken/841/10 "2025-04-14T11:34:54Z")

</div>

I think I found something but by adding EntityMemory it worked.

in my crew config I only had this :

```
 short_term_memory=ShortTermMemory(
            storage=RAGStorage(
                embedder_config=EMBEDDER_CONFIG,
                type="short_term",
                path="src/csc_flow_analyzer/crews/analyzing_crew/",
            )
        ),

```

but by adding this :

```
entity_memory = EntityMemory(
            storage=RAGStorage(
                embedder_config=EMBEDDER_CONFIG,
                type="short_term",
                path="src/csc_flow_analyzer/crews/analyzing_crew/"
            )
        ),

```

my error gone.

Probably because RAGStorage uses EntityMemory with Short Memory idk.
