Skip to content

Unclear error message when claude code/codex... API not configured #88

@viadezo1er

Description

To reproduce:

root@2a1e6eb2c8d3:~/a# export BRAINTRUST_API_KEY="my-api-key"
root@2a1e6eb2c8d3:~/a# bt setup

1. Auth
Warning: using --api-key/BRAINTRUST_API_KEY credentials for this command. Use --prefer-profile or unset BRAINTRUST_API_KEY.
   ✓ Using org 'braintrustdata.com'

2. Project
✔ Select project · cedric-bt-cli-improve-installation
   ✓ Linked to braintrustdata.com/cedric-bt-cli-improve-installation

3. Agents
✔ What would you like to set up? · Skills, MCP
✔ Select install scope · local (current git repo)
✔ Select agents to configure (Esc: back) · claude, codex, cursor, opencode
   Skills:
   — Claude — skipped
   — Codex — skipped
   — Cursor — skipped
   — Opencode — skipped
   MCP:
   ✓ Claude — installed
   ✓ Codex — installed
   ✓ Cursor — installed
   ✓ Opencode — installed

4. Instrument
Run instrumentation agent to set up tracing in this repo? yes
✔ Select agent to instrument this repo · claude
✔ Select additional workflow docs to prefetch (instrument is always included) · observe, evaluate

   — Claude — skipped
   ✗ Claude — failed

! Setup complete (with warnings)
error: agent instrumentation command failed
If this seems like a bug, file an issue at https://github.com/braintrustdata/bt/issues/new and include `bt --version`, `bt status --json`, and the command you ran.
root@2a1e6eb2c8d3:~/a# claude --version
2.1.87 (Claude Code)

The error: agent instrumentation command failed error message isn't very helpful, the issue is just that ANTHROPIC_API_KEY isn't in the env/isn't a valid API key.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions