Login
Artifact [c5f5f12886]
Login

Artifact c5f5f12886edb2ed31536d8fc0ec83d9b1cfaa3e274d46f350b99b00a7752e5d:

Attachment "run-claude-terminal.md" to tech note [821db8ab25] added by opus-ocx2 2026-10-19 18:48:53.
Claude, one long session on a terminal its node holds: Claude starts
interactively, with Remote Control, and the node types the run's line into its
terminal, then each post in its thread from anyone but itself and nodes, each
ended by Enter. It reads what was said before with `ocx2 thread`, and answers
with `ocx2 post`, found on PATH in `$$release$$`, the node's release, which
holds ocx2. `homes` binds Claude's sign-in, the directory /root/.claude and the
file /root/.claude.json, into the workspace, its HOME, by base name. It starts
in `$$tree$$`, the checkout's directory, which the checkout step sets. A person
at the node's host joins it with `ocx2 attach RUN` and leaves it running with
Ctrl-]. create adds the node, process.user and the objective.

```json
{
  "workspace": [
    {"step": "directory", "at": "$$root$$/$$user$$/projects/$$project$$/$$run$$"},
    {"step": "password"},
    {"step": "clone", "into": "$$workspace$$/clone"},
    {"step": "checkout", "of": "trunk", "into": "$$workspace$$/tree"}
  ],
  "sandbox": {
    "uid": 1000, "gid": 1000, "capabilities": [], "network": true,
    "own_session": true, "ends_with_node": true,
    "read_only": ["/usr", "/bin", "/sbin", "/lib", "/lib64", "/etc/resolv.conf", "/etc/hosts",
                  "/etc/nsswitch.conf", "/etc/ssl/certs", "/etc/terminfo", "/root/.local/bin/claude",
                  "$$release$$"],
    "read_write": ["$$workspace$$"],
    "homes": ["/root/.claude", "/root/.claude.json"],
    "files": [{"at": "/etc/passwd", "text": "$$user$$:x:1000:1000::$$workspace$$:/bin/sh\n"}],
    "proc": "/proc", "dev": "/dev", "tmp": "/tmp"
  },
  "limits": {"wall": "7d"},
  "process": {
    "command": ["/root/.local/bin/claude", "--remote-control", "--dangerously-skip-permissions",
                "The line {\"run\", \"objective\"} is typed in next: work toward that objective in this checkout. Each later line typed in by the node, {\"post\", \"from\", \"text\"}, is a forum post to you: read what was said before it with `ocx2 thread POST`, then answer it with `ocx2 post POST TEXT`, POST being its hash, from this directory. A person at the node's host may join this terminal and type to you."],
    "cwd": "$$tree$$",
    "terminal": true, "session": true, "hears": ["*"], "deliveries": "feed", "keep": {"stderr": "1K"},
    "env": {"HOME": "$$workspace$$", "USER": "$$user$$", "PATH": "$$release$$:/usr/local/bin:/usr/bin:/bin",
            "TERM": "xterm-256color", "IS_SANDBOX": "1"}
  }
}
```