You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The cockpit (.claude/scripts/cockpit-serve.sh) is a dependency-free node HTTP dashboard bound to 127.0.0.1:8090, currently started manually via pnpm cockpit and entirely decoupled from the loop lifecycle: arm-loop.sh, loop-daemon.sh, and loop-halt.sh never touch it (zero grep hits for "cockpit"). The loop only writes the state files the cockpit reads.
Goal: the cockpit should be served automatically while the cron-less loop is armed, per project. This is the foundation for per-project external exposure (see the blocked follow-up), but is useful standalone: localhost cockpit-on-arm, no Cloudflare required.
Multi-project constraint: several consumer repos (reDeploy, reDeFi, …) may run loops on one machine, so the hard-coded default port 8090 and any fixed unit name collide. Port and unit name must be per-project.
Proposal
Add an opt-in cockpit block to gates.json: { "enabled": false, "port": <unique per repo> }. Default off — the loop must not silently start web servers in repos that didn't ask.
arm-loop.sh: when enabled, launch cockpit-serve.sh as a transient systemd user unit, namespaced by a project slug (mirror the driver-unit naming), pinned with --working-directory to the repo root (PR fix(loop): pin transient driver units to the repo root via --working-directory #131 pattern) and inheriting the driver's environment (gh auth, PATH — cockpit.sh shells out to gh).
Idempotent arming: re-arm must not double-start or fight over the port; detect the live unit and leave it.
loop-halt.sh and disarm stop the cockpit unit alongside the driver.
Keep the 127.0.0.1 bind (cockpit-serve.sh:802) — no interface change in this issue.
Acceptance criteria
With cockpit.enabled: true, arming the loop serves the dashboard on the configured port; halting/disarming stops it.
With the block absent or enabled: false, behavior is exactly today's (manual pnpm cockpit still works).
Re-arm while the cockpit unit is live is a no-op for the cockpit (no duplicate unit, no port clash).
Two repos on one machine with different ports/slugs run cockpits side by side without collision.
Covered by tests alongside the existing arm-loop/loop-halt test files.
Notes
Consumer repos only benefit once the plugin update/re-stamp path delivers script changes (see the plugin-update-mechanism work; reDeploy's vendored-script drift is the live example).
Blocked by #133
Context
The cockpit (
.claude/scripts/cockpit-serve.sh) is a dependency-free node HTTP dashboard bound to127.0.0.1:8090, currently started manually viapnpm cockpitand entirely decoupled from the loop lifecycle:arm-loop.sh,loop-daemon.sh, andloop-halt.shnever touch it (zero grep hits for "cockpit"). The loop only writes the state files the cockpit reads.Goal: the cockpit should be served automatically while the cron-less loop is armed, per project. This is the foundation for per-project external exposure (see the blocked follow-up), but is useful standalone: localhost cockpit-on-arm, no Cloudflare required.
Multi-project constraint: several consumer repos (reDeploy, reDeFi, …) may run loops on one machine, so the hard-coded default port 8090 and any fixed unit name collide. Port and unit name must be per-project.
Proposal
cockpitblock togates.json:{ "enabled": false, "port": <unique per repo> }. Default off — the loop must not silently start web servers in repos that didn't ask.arm-loop.sh: when enabled, launchcockpit-serve.shas a transient systemd user unit, namespaced by a project slug (mirror the driver-unit naming), pinned with--working-directoryto the repo root (PR fix(loop): pin transient driver units to the repo root via --working-directory #131 pattern) and inheriting the driver's environment (ghauth, PATH —cockpit.shshells out togh).loop-halt.shand disarm stop the cockpit unit alongside the driver.127.0.0.1bind (cockpit-serve.sh:802) — no interface change in this issue.Acceptance criteria
cockpit.enabled: true, arming the loop serves the dashboard on the configured port; halting/disarming stops it.enabled: false, behavior is exactly today's (manualpnpm cockpitstill works).arm-loop/loop-halttest files.Notes
🤖 Generated with Claude Code