claude-code: write the agent's home as its own account where it has one (hq ADR 0266) #140
Closed
mesh-admin
wants to merge 0 commits from
feat/the-agent-runs-as-its-own-account into main
pull from: feat/the-agent-runs-as-its-own-account
merge into: :main
:main
:fix/47-G-start-2
:feat/47-G-join11
:fix/1966-gate-record-catalog
:pre/registry-milestone
:fix/1748-retake-and-resolver
:pin/sdk1
:fix/check-every-failure
:feat/l5-l7
:feat/l5-l7-a3
:feat/judge-once-pkgs
:fix/turn-handed-on-approve
:fix/checker-full-failure
:revert/774-l3
:fix/check-names-every-conflict
:fix/check-speed
:probe/1126-seed-10
:probe/1126-seed-9
:probe/1126-seed-8
:probe/1126-seed-7
:probe/1126-seed-6
:probe/1126-seed-5
:feat/1126-seed-4
:revert/1126-seed-2
:feat/774-vault-mints
:fix/1901-node-test-cause
:fix/1945-adopt-hashes
:fix/1945-vault-hashing
:feat/try-speed
:fix/1921-every-failure
:feat/r4g-finish-composer
:feat/r4g-finish-1935
:fix/1901
:fix/forge-requires-no-status
:feat/mail-list
:feat/modules-name-no-node
:fix/r4e-r2
:fix/r4e-k2
:fix/r4e-k1
:feat/r4e-leaf
:feat/r4e-buildmods
:feat/r4e-gate
:fix/1106-sdk-member-merges
:feat/r4c5-checker
:fix/xterm-config-defaults
:fix/1165-fill-retry
:feat/r4d-automx-go
:feat/r4d-n8n
:fix/1275-group-merges-whole-or-not
:fix/1129-no-drift-pass
:fix/270-nats-emits-bus-faults
:fix/claude-code-tips-preference
:fix/628-modules-declare-every-package-they-need
:fix/613-home-network-shares
:feat/bus-websocket-listener
:fix/340-tool-servers-only-from-the-terminal
:feat/the-store-collects-nightly-again
:feat/dbus-module
No Reviewers
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Assignees
agent-ace
agent-g14
agent-novox
agent-shanks
jschoubben
mesh-tools
miel.truyen
nox-agent
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: novox/mesh-catalog#140
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Part of hq ADR 0266 (on the control node, agents run under an account of their own, without sudo).
What changes. The module reads the account agents run as and its home from the runtime (
MESH_AGENT_ACCOUNT,MESH_AGENT_HOME, composed by the controller from mesh-controller's new node fact), falling back to the operator's, as before, where they are not set. Where the agent's account is not the runtime's:.claude.jsonidentity, home-scope items, the status and removal tools) is touched by a helper running as that account: this module's own binary as the plugin carries it under/etc/claude-code(root's), started once withsudo -n -u <agent> … home-fsand kept, one JSON request and answer per line. The escalation goes down only.~/.claude/mesh/of the agent, which can read them; the module's state is not readable by that account.account, no override) and records to the journal (mesh-claude-code-guard), which the session's account cannot rewrite.Where no agent account is named (every node today) nothing changes: all paths are the plain filesystem, the guard data carries no account.
Order. Safe to merge before the controller part. The manifest part (declaring the account and
claude-agent) is a separate PR, on top of this one, which needs mesh-controller's new machine facts first.Tests:
agent_account_test.go(helper protocol in-process, routing, restart, paths, licence follow, retirement of the operator-home placements, guard account rule, journal record).go test -racepasses; words and paths checks pass.Delivery
novox/mesh-catalog@c8fb0016f2d2— stopped since 2026-10-09T22:00:02ZDelivery plan — builds claude-code, claude-licence-manager, restic → ace, g14, novox, shanks; no bus step
Transitions
The commit's note under
refs/notes/mesh-plankeeps every transition:git log --notes=mesh-plan.Merge check at
63101f44mesh/merge-gate: PASS — every machine composes with the change as it did without (4 of 4 compose) (modules: claude-code)mesh/repo-check: PASS — its merge-check.sh passedDelivery plan — builds claude-code → ace, g14, novox, shanks; no bus step
Run by the build seat on shanks as
build-1791477316313796046(builds --log build-1791477316313796046).63101f447ato01c5c44249Merge check at
01c5c442mesh/merge-gate: PASS — every machine composes with the change as it did without (4 of 4 compose) (modules: claude-code, claude-licence-manager)mesh/repo-check: PASS — its merge-check.sh passedDelivery plan — builds claude-code, claude-licence-manager → ace, g14, novox, shanks; no bus step
Run by the build seat on novox as
build-1791484368398339631(builds --log build-1791484368398339631).Merge check at
499efa4emesh/merge-gate: PASS — every machine composes with the change as it did without (4 of 4 compose) (modules: claude-code, claude-licence-manager, restic)mesh/repo-check: PASS — its merge-check.sh passedDelivery plan — builds claude-code, claude-licence-manager, restic → ace, g14, novox, shanks; no bus step
Run by the build seat on shanks as
build-1791484883674305782(builds --log build-1791484883674305782).Merge check at
5718f8a7mesh/merge-gate: PASS — every machine composes with the change as it did without (4 of 4 compose) (modules: claude-code, claude-licence-manager, restic)mesh/repo-check: PASS — its merge-check.sh passedDelivery plan — builds claude-code, claude-licence-manager, restic → ace, g14, novox, shanks; no bus step
Run by the build seat on ace as
build-1791489422612267778(builds --log build-1791489422612267778).5718f8a75ctoc8fb0016f2Merge check at
c8fb0016mesh/merge-gate: PASS — every machine composes with the change as it did without (4 of 4 compose) (modules: claude-code, claude-licence-manager, restic)mesh/repo-check: PASS — its merge-check.sh passed, each part in its toolchain: merge-check.sh (go), merge-check-typescript.sh (typescript)Delivery plan — builds claude-code, claude-licence-manager, restic → ace, g14, novox, shanks; no bus step
Run by the build seat on g14 as
build-1791536618371353287(builds --log build-1791536618371353287).Rebased onto main on 2026-10-09 (head
c8fb001). Issue 340 (#149) conflicted inclaude-code/node.go, and both intents are kept in onePaths:Homecomes fromMESH_AGENT_HOME, falling back to the operator's home when there is no agent account.AgentHomeandOperatorHomeare kept for #149'sHomeIsTheAgentsOwn,HomeScopeRefusedandHomeChangeRefused.RenderNowreports both #149's left-out shared text and this branch'sRetireOperatorHome.merge-check.shpassed on the rebased head with a main-built controller as the gate (claude-code, claude-licence-manager, restic).Pull request closed