Claude never saves trust for a home directory, so claude-remote.service now runs in ~/work, which tmpfiles makes and pre-trusts in .claude.json. Its status screen on stdout no longer floods the journal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
4 files changed
+22
-7
No files matched your search
@@ -25,7 +25,8 @@ resize it to the disk size you want and boot it with UEFI and a TPM. At first
|
|||||||
boot, the screen offers a recovery key for the encrypted disk and asks for a
|
boot, the screen offers a recovery key for the encrypted disk and asks for a
|
||||||
root password. Then log in as root and put your ssh key in
|
root password. Then log in as root and put your ssh key in
|
||||||
`/home/agent/.ssh/authorized_keys` (for root: `~/.ssh/authorized_keys`), which
|
`/home/agent/.ssh/authorized_keys` (for root: `~/.ssh/authorized_keys`), which
|
||||||
starts sshd. Run `claude` once as `agent` to sign in. The VM then shows up in
|
starts sshd. As `agent`, run `claude` once in `~/work` to sign in and trust
|
||||||
|
that folder, where Remote Control runs. The VM then shows up in
|
||||||
claude.ai/code and the Claude app under its hostname: `agentos-` and four hex
|
claude.ai/code and the Claude app under its hostname: `agentos-` and four hex
|
||||||
digits.
|
digits.
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
"permissions": { "defaultMode": "bypassPermissions" },
|
"permissions": { "defaultMode": "bypassPermissions" },
|
||||||
"skipDangerousModePermissionPrompt": true
|
"skipDangerousModePermissionPrompt": true,
|
||||||
|
"remoteControlAtStartup": true
|
||||||
}
|
}
|
||||||
@@ -1,12 +1,18 @@
|
|||||||
# claude-remote.service runs Claude Code in the background, in the home of the
|
# claude-remote.service runs Claude Code in the background, in ~/work of the
|
||||||
# user agent, so it can be used from claude.ai/code or the Claude app.
|
# user agent, so it can be used from claude.ai/code or the Claude app. Claude
|
||||||
|
# never saves trust for a home directory, so it can't run in ~ itself.
|
||||||
# claude-remote.path starts it once Claude is logged in. The user manager can't
|
# claude-remote.path starts it once Claude is logged in. The user manager can't
|
||||||
# wait for the network, so Restart= retries until it is up.
|
# wait for the network, so Restart= retries until it is up.
|
||||||
|
#
|
||||||
|
# Remote Control redraws its status screen on stdout every second, which would
|
||||||
|
# flood the journal. Its errors go to stderr, which the journal keeps.
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Claude Code Remote Control
|
Description=Claude Code Remote Control
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
WorkingDirectory=~
|
WorkingDirectory=%h/work
|
||||||
ExecStart=/usr/bin/claude remote-control --name %H
|
ExecStart=/usr/bin/claude remote-control --name %H
|
||||||
|
StandardOutput=null
|
||||||
|
StandardError=journal
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=10s
|
RestartSec=10s
|
||||||
@@ -1,6 +1,13 @@
|
|||||||
# agent.conf makes the home of the user agent.
|
# agent.conf makes the home of the user agent, and in it work, where
|
||||||
|
# claude-remote.service runs (mkosi.extra/usr/lib/systemd/user).
|
||||||
d /home/agent 0700 agent agent
|
d /home/agent 0700 agent agent
|
||||||
|
d /home/agent/work 0700 agent agent
|
||||||
|
|
||||||
|
# .claude.json trusts ~/work, so claude-remote.service can run there without
|
||||||
|
# the trust dialog first. It is only made if missing, because Claude keeps its
|
||||||
|
# login there too.
|
||||||
|
f /home/agent/.claude.json 0600 agent agent - {"projects":{"/home/agent/work":{"hasTrustDialogAccepted":true}}}
|
||||||
|
|
||||||
# linger starts the user manager of agent at boot, for rootless podman and
|
# linger starts the user manager of agent at boot, for rootless podman and
|
||||||
# claude-remote.path (mkosi.extra/usr/lib/systemd/user).
|
# claude-remote.path.
|
||||||
f /var/lib/systemd/linger/agent
|
f /var/lib/systemd/linger/agent
|
||||||
Reference in new issue
Block a user