claude-code - 💡(How to fix) Fix Allow disabling or recoloring autolink ANSI in chat output (markdown renderer) [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#55931Fetched 2026-05-05 06:02:38
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Timeline (top)
labeled ×3commented ×1

Fix Action

Fix / Workaround

Workaround (today)

Code Example



---
RAW_BUFFERClick to expand / collapse

Problem

In chat output rendered to a terminal, Claude Code's CommonMark renderer wraps URL-shaped strings — bare URLs, [label](url) markdown, <url> angle-bracket autolinks, AND #NNN GitHub-issue references — in hardcoded blue ANSI escape codes. On dark terminal themes (typical iTerm2 setup), this blue is effectively unreadable against the background.

Reproduction

Open Claude Code in iTerm2 with any standard dark theme. Ask Claude anything that produces a URL or #NNN reference in its reply. The URL/reference renders in dark blue.

Tested on macOS 25.3.0, iTerm2 3.6, dark theme.

Workaround (today)

Wrap URLs in a fenced code block (triple backticks):

```
https://example.com/some-path
```

Code blocks are not autolinked, so the renderer leaves them alone, and iTerm2 Smart Selection still detects URL patterns at ⌘-click time. This works but forces every URL onto its own line — three lines for what should be inline.

What I tried (none worked)

  • iTerm2 per-profile Link Color setting → no effect (Claude emits the blue ANSI itself; iTerm just displays what it receives).
  • Searching ~/.claude/settings.json schema, /theme command, env vars — no setting controls autolink coloring.
  • /output-style only changes the system prompt, not renderer behavior.

Request

Expose a way to disable or recolor autolink ANSI. Any of these would solve it:

  1. autolinkColor (or similar) in settings.json — accepts an ANSI color name, hex, or none to disable styling.
  2. Env var like CLAUDE_AUTOLINK_COLOR=none.
  3. /theme extension — let custom themes override autolink color the same way they override prompt-border / diff colors.

Disabling entirely (option 1 with none) would be ideal for users on dark themes — let URLs render in default text color, and let the terminal's URL detector handle clickability.

Why it matters

Terminal-first workflows lean heavily on chat output as the primary interface. Issue references, file paths, and routes in chat need to be readable AND ⌘-clickable. The current behavior forces a tradeoff between readability (fenced blocks, three lines per URL) and conversational density (inline URLs that are unreadable).

extent analysis

TL;DR

To improve readability of URLs in Claude Code's chat output on dark terminal themes, consider adding an autolinkColor setting to settings.json or introducing an environment variable like CLAUDE_AUTOLINK_COLOR to control autolink ANSI color.

Guidance

  • Investigate the possibility of adding an autolinkColor property to the settings.json schema to allow users to customize the color of autolinks.
  • Consider introducing an environment variable, such as CLAUDE_AUTOLINK_COLOR, to provide an alternative method for users to control autolink color without modifying the settings.json file directly.
  • Evaluate the feasibility of extending the /theme command to include options for customizing autolink colors, aligning with how custom themes can override other visual elements.
  • Test the proposed solutions on various terminal themes and setups to ensure compatibility and effectiveness.

Example

No specific code example is provided due to the lack of explicit code references in the issue, but the solution would involve modifying the rendering logic to respect the newly introduced autolinkColor setting or environment variable.

Notes

The ideal solution would allow for disabling autolink styling entirely by setting the color to none, enabling URLs to render in the default text color and relying on the terminal's URL detector for clickability.

Recommendation

Apply a workaround by wrapping URLs in fenced code blocks until a permanent solution, such as adding an autolinkColor setting, is implemented. This recommendation is based on the provided workaround's effectiveness in improving readability, albeit with the drawback of requiring extra lines for each URL.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Allow disabling or recoloring autolink ANSI in chat output (markdown renderer) [1 comments, 2 participants]