Public: anyone can read this; the crew can change it.
A crew run's processes carry the cell label crew:<name> #2815
A crew run's processes now show up in /system under crew: instead of forge or host. tsc --noEmit is clean. The new test file passes, and so do the 19 /system, view and crew test files I ran alongside it (119 tests).
stopped closed without shipping deploy 2b44a3a
A crew run's processes now show up in /system under crew:<name> instead of forge or host. tsc --noEmit is clean. The new test file passes, and so do the 19 /system, view and crew test files I ran alongside it (119 tests). I did not run the whole suite.
What changed
- Labelling:
labelRun(pid, agentName)insrc/crew/sandbox.tsregisters the run's process tree undercrew:<name>, usinglabelTreeinsrc/apps/contain.ts. A name that isn't a plain username is refused rather than put in a label. - Wiring:
runClaudelabels the agent process it spawns and releases the label when the process ends. The runner passes the agent's username asagent. /system:src/system/view.tsgains acrewgroup kind, and the live page ranks it after check. A labelled but uncapped group reports a null memory cap.- Privacy:
crewgroups hide their processes and test files from agent readers, as forge and host do, because a run may be working in a private clone. - Test:
test/crew-label.test.tslabels a real process tree, then checks the label incellRoots()and thecrewgroup in the built view. It also checks that the label goes away on release and that a bad name is refused. It needs no unix socket, so it is not skipped inFORGE_TEST_SOCKETmode.
What I left out
- The run is only labelled, not put in a cell or held to limits. Claude Code's own bwrap sandbox still holds the shell, so the issue's "same way as
check:<run>" is true of the label and the watching, not the cell. Putting the run in acontain.tscell would change how the agent's shell is isolated, which is a separate decision.
To try it: start a crew run, open /system, and look for a crew:<agent> group in the process table.
Declined: already done on main in 8e07c8d6. That commit (#2796) added src/crew/roots.ts with watchCrewRoot. runClaude in src/crew/claude.ts calls it, and the runner passes crew:<name> as the label. src/system/view.ts already has the crew group kind, and test/system-crew.test.ts covers the label. Run log: https://forge.open-platform.sh/trevato/forge/runs/01m5akcv7x0pha9japt2s82j92
A crew run's processes now show up in
/systemundercrew:<name>instead of forge or host.tsc --noEmitis clean. The new test file passes, and so do the 19/system, view and crew test files I ran alongside it (119 tests). I did not run the whole suite.What changed
labelRun(pid, agentName)insrc/crew/sandbox.tsregisters the run's process tree undercrew:<name>, usinglabelTreeinsrc/apps/contain.ts. A name that isn't a plain username is refused rather than put in a label.runClaudelabels the agent process it spawns and releases the label when the process ends. The runner passes the agent's username asagent./system:src/system/view.tsgains acrewgroup kind, and the live page ranks it after check. A labelled but uncapped group reports a null memory cap.crewgroups hide their processes and test files from agent readers, as forge and host do, because a run may be working in a private clone.test/crew-label.test.tslabels a real process tree, then checks the label incellRoots()and thecrewgroup in the built view. It also checks that the label goes away on release and that a bad name is refused. It needs no unix socket, so it is not skipped inFORGE_TEST_SOCKETmode.What I left out
check:<run>" is true of the label and the watching, not the cell. Putting the run in acontain.tscell would change how the agent's shell is isolated, which is a separate decision.To try it: start a crew run, open
/system, and look for acrew:<agent>group in the process table.Closes #2810