Agent terminal sets FORCE_COLOR=0 alongside NO_COLOR=1

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

The agent terminal exports both NO_COLOR=1 and FORCE_COLOR=0, plus TERM=dumb. Tools that follow the FORCE_COLOR standard treat any non-empty value as force-color-on, and “0” is non-empty, so it conflicts with NO_COLOR.

Pylint 4.1 and later then prints this on every run, in every project:

ReporterWarning: Both NO_COLOR and FORCE_COLOR are set! (disabling colors)

Node prints: The ‘NO_COLOR’ env is ignored due to the ‘FORCE_COLOR’ env being set.

Nox used to exit immediately with “Can not specify both --no-color and --force-color” until it special-cased FORCE_COLOR=0: `FORCE_COLOR=0` triggers `--forcecolor` · Issue #1069 · wntrblm/nox · GitHub

These variables are not in the User or Machine environment, and the project does not set them. The agent shell injects them. The interactive terminal at the bottom of the window does not have this pair.

Steps to Reproduce

  1. Ask the agent to run a command, so the command runs in the agent terminal.
  2. In PowerShell, print the process values and the User and Machine scopes:

Write-Output “process NO_COLOR=$env:NO_COLOR FORCE_COLOR=$env:FORCE_COLOR”
Write-Output “user NO_COLOR=$([Environment]::GetEnvironmentVariable(‘NO_COLOR’,‘User’)) FORCE_COLOR=$([Environment]::GetEnvironmentVariable(‘FORCE_COLOR’,‘User’))”
Write-Output “machine NO_COLOR=$([Environment]::GetEnvironmentVariable(‘NO_COLOR’,‘Machine’)) FORCE_COLOR=$([Environment]::GetEnvironmentVariable(‘FORCE_COLOR’,‘Machine’))”

Process shows NO_COLOR=1 and FORCE_COLOR=0. User and Machine are empty.
3. Run pylint on any file: python -m pylint path\to\file.py

Actual result: pylint prints

pylint_init_.py:34: ReporterWarning: Both NO_COLOR and FORCE_COLOR are set! (disabling colors)

and still exits 0.
4. Optional: node -e “process.stdout.write(‘ok\n’)” prints Node’s warning that NO_COLOR is ignored because FORCE_COLOR is set.

Expected Behavior

Leave FORCE_COLOR unset in the agent terminal. NO_COLOR=1 and TERM=dumb already request plain output. Set FORCE_COLOR only when color should be forced on.

https://force-color.org says any non-empty value forces color on, so FORCE_COLOR=0 is force-on to those tools, and they then warn or fail because NO_COLOR is also set. Node and chalk treat 0 as off, so the same value means the opposite thing to different tools.

This is not a request to turn color on in the agent terminal. Plain output is fine. Please stop exporting FORCE_COLOR.

Operating System

Windows 10/11

Version Information

IDE:
Version: 3.32.10
VSCode Version: 1.147.0
Commit: 0d3b96e46ce65af82ed74bc6f14883b33e1a0590
Date: 2026-11-26T05:52:13.242Z
OS: Windows_NT x64 10.0.19045
Shell: PowerShell 5.1

For AI issues: which model did you use?

Not model-specific. The agent shell injects the variables before any model runs a command.

Additional Information

I searched the forum and did not find a report that asks for FORCE_COLOR to be left unset. The existing thread “Colors not working on Agent Terminal” is about TERM=dumb and was closed as intentional.

Unsetting FORCE_COLOR in that shell, while leaving NO_COLOR=1, removes the pylint warning and Node’s warning. Output stays plain. I confirmed that locally.

Other projects are already working around this pair. Nox special-cased falsy FORCE_COLOR values because of the Cursor agent terminal. Some apps scrub FORCE_COLOR when they are launched from a Cursor agent shell.

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey @tboy1337, you’re right: the agent shell sets FORCE_COLOR=0 itself on every command, next to NO_COLOR=1 and TERM=dumb. It was meant as one more “no color” signal, but tools that treat any non-empty FORCE_COLOR as “on” see a conflict.

The agent’s PowerShell loads your profile, so this line in $PROFILE drops the variable for agent commands only:

if ($env:CURSOR_AGENT) { Remove-Item Env:FORCE_COLOR -ErrorAction SilentlyContinue }

It applies to new chats (an existing chat keeps the old value). I checked it on PowerShell 7, and 5.1 should behave the same.

One note on Node: it only prints that warning when FORCE_COLOR is 1, 2, 3 or true, so if you see it, something else in the chain is setting FORCE_COLOR.