[FEATURE] Do not write the raw machine ID to debug logs; use an app-specific hash (Linux)

Status Open
Reported on v2.1.284
Maintainer reply None cached
Activity 0 comments · opened Sep 29, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

Environment: Claude Code 2.1.284, Ubuntu 24.04.5 LTS.

Debug logs written with claude --debug contain the raw systemd machine ID (/etc/machine-id) in
the session registry lines, e.g.:

[DEBUG] [sessionRegistry] sweep permitted (domain linux:<MACHINE_ID>:pid:[4026531836])

The bug report form has a field for logs, so users attach these logs to GitHub issues. The
machine ID is a permanent identifier of the installation, and machine-id(5) says it should be
treated as confidential and not be exposed to the network. I attached an unredacted debug log to
an issue before noticing this, and removing it again needs GitHub Support. Claude Code already
redacts tokens in the same log ([REDACTED]), so the machine ID is the remaining identifier that
users are unlikely to recognize.

Proposed Solution

Use an app-specific ID instead of the raw machine ID, as machine-id(5) recommends: HMAC-SHA256
keyed with the machine ID over a fixed application ID, truncated to 128 bits. This is what
sd_id128_get_machine_app_specific() and systemd-id128 machine-id --app-specific=<app-uuid>
compute. The result is stable per machine, so it serves the session registry equally well, but
it cannot be traced back to the machine ID or correlated with other applications.

If the raw value is needed internally, at least write the hashed value to the debug log.

This affects all Linux distributions with systemd, not only Ubuntu. The linux: prefix suggests
that other platforms use a different value. If Claude Code writes comparable IDs on macOS (e.g.
the hardware UUID) or Windows (e.g. the MachineGuid registry value), the same change applies
there.

Alternative Solutions

A command or flag that either writes or exports a debug log with identifiers removed or hashed as proposed, for attaching to issues.

Priority

Medium - Would be very helpful

Feature Category

CLI commands and flags

Use Case Example

This is a security feature, which enhances the privacy of users when they file bug reports or feature requests for Claude Code and attach debug logs.

Additional Context

_No response_

View original on GitHub ↗