Port the launcher to Go #2
Reference in New Issue
Block a user
Delete Branch "benvin/go-launcher"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The bash launcher shells out to podman for every step and is tested by a bash harness; a Go tool gives typed specs, unit tests against a fake engine and a packaged binary.
agent-sandboxlauncher with the same env, images and refusal checks; every argument passes through to claude or--execverbatimpodman system servicethat stops when the launcher diesunkin-agent referenced this pull request2026-10-24 17:05:43 +11:00
checkLaunchDirdoes not refuse launch dirs that are/contain$XDG_RUNTIME_DIR(or the/tmpfallback), so launching from e.g./run/user/1000bind-mounts the privatepodman.sock(podman.go:49) into claude: the sandbox gets the full host podman API (create containers with host mounts / egress net) → refuse any pwd that contains the api dir (and router tmp dir), same as the$HOMEcheck; add a refusal test.podman system service --time=0in its own process group outlives a SIGKILLed launcher forever, leaving a live API socket in the runtime dir → addPdeathsig: syscall.SIGTERMtoSysProcAttr.golangci/golangci-lint:latestis unpinned; lint results drift with upstream releases → pin a version.version/help/completionsubcommands from the first non-flag word anywhere in argv, so passthrough args are hijacked:agent-sandbox --exec podman versionfails withError: unknown flag: --execinstead of running in the sandbox,agent-sandbox helpprints launcher help instead ofclaude help(bash passed all args through) → only dispatch a subcommand whenos.Args[1]is exactly its name (otherwise go straight tolaunch), and add a test for--exec podman version.