#5013·baml

baml-bridge 0.20.1 writes full prompts to <cwd>/.baml/profiles-v1 by default; please document/support disabling it

Author: ViperJuiceCreated Sep 28, 2026Updated Sep 28, 2026

With @boundaryml/baml-bridge 0.20.1 (Node), initializeRuntime(...) creates <process.cwd()>/.baml/profiles-v1/. That happens even when the source is given as an absolute path, and even if no function is called afterwards. From then on, every build and parse writes the call's arguments and the full request body (the whole rendered prompt) there as plain text, along with a profiles-v1.lock. The directory ships its own .gitignore containing *, so git status stays clean and the growth goes unnoticed: about 11 MB and 750 files after a few dozen calls in our case.

For tools that only build requests or parse replies (we never let BAML call a model), and that run with a client's repository as the working directory, this means prompt contents (diff and PR-comment excerpts) pile up inside someone else's tree with no bound.

The only way we found to turn it off is the undocumented BAML_PROFILE_DIR="", which we found in the native binary's strings. A non-empty value such as off, none or 0 is treated as a directory name, and it also creates a sibling .lock. The variable is read once, at initializeRuntime.

Requests:

  1. Document how to disable local profiling, and make the switch a supported contract: a documented env var or an initializeRuntime option.
  2. Consider leaving profiling off by default when the runtime is used as a library, or at least not writing into cwd without an explicit opt-in.
  3. If BAML_PROFILE_PUBLISH_INTERVAL_MS / publish.lock relate to sending profiles anywhere, document that too.

Environment: Linux x86_64, Node 24.13 (also 20 and 22), @boundaryml/[email protected].