[BUG] Claude code does not take Anthropic environment variables and not show colors in terminal

Resolved 💬 3 comments Opened Oct 10, 2025 by hxt365 Closed Jan 10, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Claude Code does not display colors in the terminal. It also does not accept environment variables ANTHROPIC_API_KEY and ANTHROPIC_BASE_URL, displaying a 'Missing API key' error. This issue happens when Claude Code does not have read access to its parent folders, which is common in our organization's setting.

What Should Happen?

Claude Code should display colors in the terminal. It should also successfully handle user requests, given the two environment variables ANTHROPIC_API_KEY and ANTHROPIC_BASE_URL.

Error Messages/Logs

Steps to Reproduce

  1. mkdir -p ./foo/bar
  2. chmod 111 ./foo
  3. cd ./foo/bar
  4. Run claude -> it will not display logs in colors
  5. ANTHROPIC_API_KEY=<api_key> ANTHROPIC_BASE_URL=<base_url> claude -> it will not use the API key

<img width="929" height="403" alt="Image" src="https://github.com/user-attachments/assets/f24f2fc2-13ab-4703-ab10-a513655b671f" />

Claude Model

None

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.0.13

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗