fix(claude): statusline hostname source - LocalHostName not hostname -s#74
Merged
Conversation
Drops the "which machine am I on" question from every session. SessionStart hook prints `Machine: <user>@<host> (<hw.model>)` so Claude sees the active box first thing. CLAUDE.md gains a "Machines I work from" table mapping verbal shorthand (mini, air, egress-tokyo) to SSH aliases, so "upgrade hermes on the mini" resolves without asking. - new: dot_claude/hooks/machine-banner/executable_machine-banner.sh - modify_settings.json: dedup-by-marker SessionStart entry alongside Stop / PreToolUse, preserving guardrails additive merge - modify_CLAUDE.md.tmpl: prepend "Machines I work from" before the "Tool selection" heredoc Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Document the SPEC-052 ops convention so Claude routes work to the right ssh alias by default: `mini` (server) for daemon control / log tail / the one ADR-0012 kickstart grant; `mini-tieubao` (tieubao) for any broader foundation.d.* manipulation. This makes SPEC-032's passwordless promise actually deliver across the whole `foundation.d.*` namespace without re-discovering the "server-can't-bootout" wall every time. Refs: dfoundation SPEC-052, SPEC-032, ADR-0012. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
`hostname -s` returns "Mac" on macOS by default (SMB-style short hostname), which is useless when you have multiple machines. `scutil --get LocalHostName` returns the actual user-set name (e.g. "Hans-Air-M4"), matching what the SessionStart machine-banner hook already uses. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hostname -swhich returns the genericMacon macOS by default (SMB-style short hostname), making the@<host>segment useless across multiple machines.scutil --get LocalHostName(withhostname -sas fallback), matching what the SessionStartmachine-banner.shhook already uses. Now shows@Hans-Air-M4.Test plan
@Hans-Air-M4scutil --get LocalHostNamereturns expected value,hostname -sfallback exists🤖 Generated with Claude Code