Repository navigation
adopt: Linux client paths, process names and shell exports - #172
Merged
Merged
Conversation
- Claude Code managed policy: /etc/claude-code on Linux; Windows moves to %ProgramFiles%\ClaudeCode (the docs say ProgramData is no longer read). - Config locations become `paths::Loc` (home-relative or XDG-relative). opencode (every platform), Zed and Claude Desktop (Linux) honour $XDG_CONFIG_HOME / $XDG_DATA_HOME, but only when the home passed in is the process's own, so tests with a temp home stay isolated. - Claude Desktop on Linux (beta) lives at $XDG_CONFIG_HOME/Claude. - Process detection: parse `ps` lines in one place, match by name prefix (Linux truncates comm to 15 bytes), and give Zed its per-platform process name (`zed-editor` on Linux, `zed` on macOS, `Zed` on Windows). - Shell exports: add .bash_login; match exact variable names on real export statements; parse fish `set` flags (-x/-gx/-Ux/--export, not -e) only in config.fish, so bash's `set -x` is no longer read as an export. - The "delete this line" fix uses GNU sed syntax off macOS (new code adopt.diag.delete_line_gnu). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Sep 24, 2026
Merged
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.
Linux support for
tw-adopt(client detection, takeover, manual steps, diagnosis).Paths
paths::Loc: a config location is either home-relative or XDG-relative. XDG variables are honoured only when the home passed in is the process's own$HOME(%USERPROFILE%), so tests that pass a temp home never touch the developer's real config. Relative XDG values are ignored, per the spec.$XDG_CONFIG_HOME/opencodeon every platform (it usesxdg-basedir); data marker$XDG_DATA_HOME/opencode.$XDG_CONFIG_HOME/zedon Linux; macOS stays~/.config/zed(Zed hard-codes it there); Windows unchanged.userData→$XDG_CONFIG_HOME/Claude/claude_desktop_config.json. It stays in the MCP target list and the scan./etc/claude-code/managed-settings.jsonon Linux. Windows fix:%ProgramFiles%\ClaudeCode\managed-settings.json; the docs sayC:\ProgramData\ClaudeCodeis no longer read.McpTargetView.pathnow carries the displayable path (~/.claude.json), not the bare relative string.<project>/.config/opencode/...).Process detection (
running_since)ps -Ao pid=,etime=,comm=lines (macOS full paths with spaces, Linux 15-byte names). Match by name prefix instead of substring.zed-editoron Linux (libexec/zed-editor;bin/zedis the CLI),zedon macOS (Zed.app/Contents/MacOS/zed— the old"Zed"marker never matched there either),Zedon Windows.nodewrapper is ignored, its nativecodexchild is matched; Claude Code and opencode npm packages install native binaries.Shell exports
.bash_login. Matches exact variable names on realexportstatements (no moreOPENAI_BASE_URL_OLDorecho $Xhits).setwith-x/-gx/-Ux/--export(not-e) inconfig.fishonly; bash'sset -xis no longer read as an export.sed -i '{line}d' {path}off macOS (GNU sed rejects-i ''). New msg codeadopt.diag.delete_line_gnu.Tests with realistic Linux and macOS
pslines, fish/bash export parsing and XDG resolution are included.🤖 Generated with Claude Code