-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Description
The Claude Code installer outputs ANSI escape sequences that get corrupted when displayed in GitHub Actions logs, resulting in garbled, unreadable text.
Current Behavior
When the claude-code-action runs in a GitHub Actions workflow, the installation step produces corrupted output like:
Installing Clude Cde nive build2.1.25...
Seting uplauncher and shellintegration.
✔Clade Code successfullyinstalled!
Lcation: ~/.local/bin/claud
Instead of the expected:
Installing Claude Code native build 2.1.25...
Setting up launcher and shell integration.
✔ Claude Code successfully installed!
Location: ~/.local/bin/claude
What We've Tried
We attempted to disable ANSI output by setting standard environment variables at the job level:
jobs:
claude-pr-review:
runs-on: ubuntu-latest
env:
TERM: dumb
NO_COLOR: 1
steps:
- name: PR Review
uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}However, the Claude Code installer doesn't respect these environment variables, and the output remains garbled.
Root Cause
The issue appears to be that:
- The Claude Code installer outputs ANSI escape sequences for formatting (colors, cursor positioning, etc.)
- GitHub Actions log viewer doesn't properly render these sequences
- Instead of stripping them out cleanly, they get partially rendered, causing text corruption
Proposed Solutions
-
Respect
NO_COLORandTERMenvironment variables - This is the standard approach used by most CLI tools (see https://no-color.org/) -
Add a parameter to disable fancy output - For example:
- uses: anthropics/claude-code-action@v1 with: plain_output: true
-
Pass a flag to the installer - If the installer supports it, pass a
--no-ansior--plainflag when these environment variables are detected
Related Issues
- claude-code#15509 - Feature request for
--no-ansiflag (which would also solve this issue)
Impact
- Log readability: CI/CD logs are essential for debugging and monitoring, and garbled text makes them difficult to read
- Professional appearance: Corrupted output looks unprofessional in build logs
- Consistency: Most modern CLI tools respect
NO_COLORandTERMenvironment variables
Environment
- GitHub Actions runner: ubuntu-latest
- claude-code-action version: v1
- Observed across multiple repositories and workflow configurations
Thank you for considering this issue!