oliver-zehentleitner / maity
cli: maity runner init, an interactive setup that asks for harnesses and prepares the machine
tsk-fv7apqnv5yw2 Open
The maintainer, 2026-11-17 (chat 149314): "warum trägt er claude ein? was wenn einer was anderes will? eigentlich wäre ein init befehl gut der das abfragt und das environment herrichtet".
Today the starter configuration (web runners.js starterConfig, and pair without a configuration) always writes [harness.claude-code] only. Someone who wants Codex, Antigravity or OpenCode has to know the TOML by heart, and check reports only what is configured.
Build maity runner init, an interactive setup after pair, idempotent and safe to run again:
- It asks which harnesses to run (Claude Code, Codex, Antigravity, OpenCode, more than one allowed) and their modes. For Claude Code and Codex it offers the managed install (
install = true,update = "daily", §"Keeping Claude Code and Codex current"). - It asks for the projects and repositories (offering the ones the hub has attached the runner to), the
[git]identity, andmax_agents. - It writes runner.toml. An existing file is shown as a diff and changed only after a yes; keep a backup.
- System packages: it checks tmux, bubblewrap and socat (Linux), gpgv (managed Claude Code) and git. It installs nothing with sudo itself: it prints the one command for the detected OS (apt/dnf/pacman/brew) and waits, or exits telling the user to run it.
- It installs the managed tools now, if chosen, then runs
check, and on Linux with systemd offersmaity runner install. --non-interactivewith flags for scripts.
Also: the web's starter configuration and the pairing steps stop assuming Claude Code. They point to maity runner init as the next step after pair. Coordinate with tsk-vg1yqpf586wq (pairing steps), which touches the same page.
Plan to the lead before the first push. CLI tests, docs/runners.md and cli/README.md in the same PR, plus a KTW entry for why init prints the sudo command instead of running it.
Notes
Lotse · Nov 17, 2026, 10:56 UTC
Found on 2026-11-17 with the maintainer's second runner:
sudo maity runner installonly fits its own fixed layout (/etc/maity-runner, /var/lib/maity-runner, a system user it creates). It refuses an existingmaity-runneraccount without its install record. The setup the web pairing leads to is a normal user with everything under its home, paired already, with maity from pipx in ~/.local/bin. For that setup our two runners use the shipped unit with two lines changed:ExecStart=/home/maity-runner/.local/bin/maity runner serve(no --config) andReadWritePaths=/home/maity-runner /tmp.
Soinit(orinstall --user-layout, the coder decides) should set up the service for the layout pairing actually produces: detect the user, home, maity path and config, write the unit, daemon-reload, enable --now. The docs must stop pointing a paired home-layout runner atinstall.Lotse · Nov 17, 2026, 12:34 UTC
From the ops setup on 2026-11-17 (seq 151236), also for init: an optional headless browser with its AppArmor profile (Ubuntu 23.10+ blocks unprivileged user namespaces, so Playwright's headless shell fails with "No usable sandbox"; snap chromium refuses non-snap sessions), and creating
~/.local/state/maitywith mode 0700. The full needs list is the new card tsk-r1a5g6jxk1yj.Lotse · Nov 17, 2026, 13:34 UTC
From the maintainer, 2026-11-17 (chat 151738), for init: agy installs with Google's script
curl -fsSL https://antigravity.google/cli/install.sh | bash, run as the agents' user. init should offer it as a choice, run it with the user's consent (vendor script, so say so), then have the user sign in once withagy.Lotse · Nov 17, 2026, 13:47 UTC
From ops on OLIVER-PC01-L, 2026-11-17 (maity-ops-team#3yc2, seq 151829). The maintainer added a per-binary AppArmor profile for
~/.local/bin/agy, but the antigravity namespace warning inmaity runner checkstays. The reason:agy_namespaces()(cli runner/capabilities.py:319-331) probes/usr/bin/unshareas the agents' user, so on Ubuntu 23.10+ it reports what an arbitrary process may do, not what agy may do.For init and check:
- probe under agy's own profile (
aa-exec -p <profile> unshare …), or detect and name the profile; - have init install the agy profile, and the headless-browser profile, with consent.
The only other way to clear the warning is the system-wide sysctl
kernel.apparmor_restrict_unprivileged_userns=0. Don't recommend it. Whether agy's sandbox really starts with the profile is not verified yet.- probe under agy's own profile (
Lotse · Nov 17, 2026, 14:11 UTC
From OLIVER-PC01-L, 2026-11-17 (maity-ops-team#3yc2, seq 151956). The systemd unit starts
maity runner servewithout~/.local/binon PATH, and runner.toml had noagent_path. So agy (in ~/.local/bin) wasbinary_not_found, andmaityitself was not on the agents' PATH. Every placed agent there would have failed to run maity.maity runner checkpassed anyway, because it uses the caller's shell PATH, not the service's.For init/install/check:
runner install(and init) writes a PATH oragent_paththat includes the pipx bin dir and~/.local/bin.runner checkchecks with the PATH the service will have, not the shell's.
Lotse · Nov 17, 2026, 15:27 UTC
From OLIVER-PC01-L (Ubuntu 26.04), 2026-11-17 (maity-ops-team#3yc2, seq 152527).
The apparmor package ships the profile
bwrap-userns-restrict. Processes bwrap starts run underunpriv_bwrap, which denies capabilities, so a bwrap inside a bwrap cannot create namespaces ("No permissions to create a new namespace"). As a result, a placed Claude Code agent's shell failed entirely.maity runner checkonly tests that bwrap and socat exist, and said ok.Wanted:
check(and the start) runs the real probe the harness needs, including the nested case where it applies.- It reports this AppArmor restriction by name, with the documented fix.
- Codex's own
codex sandbox -- trueprobe passed there, socheckshould verify each harness's sandbox the way the harness actually uses it.
Lotse · Nov 17, 2026, 15:29 UTC
From OLIVER-PC01-L, 2026-11-17 (maity-ops-team#3yc2, seq 152553). A Codex placement never started its loop: its tmux pane stood at Codex's first-run "Folder access" dialog for the untrusted workspace (Open restricted / Back), with nobody to answer it. Wanted: the runner starts Codex with the workspace trusted (a
-c projects."<ws>".trust_level=...override or a written config the runner owns), andcheck/the start report a harness that waits on an interactive prompt instead of showing it as running.