Skip to main content
Applies to:
  • Plan -
  • Deployment -
Summary When running evaluations via remote evals, traces may appear minimal compared to CLI evals, and prompts may not be visible in the experiment. This occurs because remote evals run on your infrastructure without Braintrust’s instrumented runner. You can detect execution context using environment variables and hooks.tags to conditionally adjust tracing, logging, or other behavior between CLI and remote eval runs.

Configuration Steps

Step 1: Set Environment Variable for CLI Execution

When running evaluations via CLI, set an environment variable to mark the execution context.

Step 2: Add Context Tag in Task Function

Check the environment variable in your task function and add a tag to identify CLI execution.

Step 3: Use Context Detection in Task Logic

Check for the presence of the tag to determine execution context and implement conditional behavior.

Limitations

This approach requires manually prepending the environment variable to every CLI command. There is no built-in SDK support for execution context detection currently available.