[BUG] FreeBSD reported as `Platform: linux` in environment block and /feedback submissions

Resolved 💬 3 comments Opened Apr 21, 2026 by mmenefee Closed Jun 30, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report
  • [x] I am using the latest version of Claude Code

What's Wrong?

Claude Code's own environment/feedback reporting mislabels FreeBSD hosts as linux.

When you run Claude Code on a native FreeBSD host (not Linuxulator, not a Linux jail — actual FreeBSD userland on an actual FreeBSD kernel), the agent's environment block reports:

Platform: linux
OS Version: FreeBSD 15.0-RELEASE-p2

These two lines contradict each other. The /feedback submission carries the same mislabel forward, so any bug report a FreeBSD user files through the in-product path arrives tagged as a Linux report.

This is a small string bug on its own, but it has real consequences:

  1. Broken telemetry. Anthropic cannot tell how many FreeBSD users are active — they're all bucketed as Linux. Decisions about dropping FreeBSD support (#30640) are being made without the data that would show the actual user count.
  2. Broken feedback loop. FreeBSD users have no working channel to flag FreeBSD-specific issues through Claude Code itself — the feedback form lies about their OS before the message ever reaches anyone.
  3. Leaks into agent behavior. When the model is told "Platform: linux", it reasons about the environment incorrectly — suggesting apt install, systemctl, /proc/*, glibc paths, etc. on a FreeBSD host. FreeBSD users see generic Linux advice they then have to correct by hand.

What Should Happen?

The platform string shown to the agent and used in feedback submissions should match process.platform / uname. On FreeBSD it should read freebsd, not linux.

Minimum viable fix: pass through process.platform verbatim to the system prompt and feedback metadata instead of collapsing non-Darwin/non-Windows to "linux".

Error Messages/Logs

Node reports the platform correctly:

$ node -e 'console.log(process.platform)'
freebsd

Claude Code's environment block, on the same host, disagrees:

- Platform: linux
- Shell: /bin/tcsh
- OS Version: FreeBSD 15.0-RELEASE-p2

Steps to Reproduce

  1. Install Claude Code on a FreeBSD host (npm install from a pinned pre-native version, or via the FreeBSD port, or via the BUN_JSC_useBBQJIT=0 Linuxulator workaround from #30640).
  2. Start a session.
  3. Ask the agent what platform it thinks it's running on, or type /feedback and observe the reported environment.
  4. Note that Platform: says linux while OS Version: says FreeBSD ….

Claude Model

Opus (claude-opus-4-7)

Is this a regression?

Not sure — may have been wrong since the platform string was first added. This was noticed today (2026-04-21) while trying to submit feedback about unrelated FreeBSD issues.

Last Working Version

N/A

Claude Code Version

2.1.111

Platform

Anthropic API

Operating System

Other (FreeBSD 15.0-RELEASE-p2, amd64)

Terminal/Shell

tcsh

Additional Information

Related but distinct from the FreeBSD support questions in #30640 and #51020. Those are about whether FreeBSD runs Claude Code at all; this one is about Claude Code telling its own users (and itself) the wrong OS name when it is running. The two problems compound: FreeBSD users have lost the native build path AND the feedback path that would let them explain why that matters.

View original on GitHub ↗

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