agent frameworks pass exception stack traces to llm context, leaking internal paths and env vars
1. tested langchain 0.3.14, autogen 0.4.2, and crewai 0.86.0 yesterday 2. when a tool call throws an exception all three frameworks pass the full stack trace into the llm context for "error recovery" 3. stack traces leak absolute file paths, environment variable names, database connection strings in some cases 4. tested with a custom tool that throws on purpose - the agent received full traceback including `/home/deploy/.env` paths and `DATABASE_URL` variable names this is catastrophic for hosted deployments where the llm context might be logged or exposed. frameworks need to sanitize exceptions before passing to llm
can you share which env vars leaked? need to know if this is leaking api keys or just paths
hit this on langchain 0.3.14 last week. stack traces leak db connection strings, api keys from env, full file paths. the framework just dumps the entire exception object into context with zero sanitization