mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-10-22 18:03:10 +02:00
The module-level EventListener builds a TraceBatchManager, whose __init__ called get_auth_token(). That instantiated TokenManager, which runs Fernet.generate_key() and writes secret.key to the user data dir, so `import crewai` consumed OS entropy and touched disk even with tracing disabled. Runtimes that forbid randomness during import snapshots fail on this. plus_api is now a cached_property that builds the client on first access. A missing or unreadable token (corrupt tokens file, unwritable data dir) yields an anonymous PlusAPI, since that failure now happens mid-run. The `not self.plus_api` guards were always false and are gone, along with a duplicate ephemeral_trace_url assignment.