Repository navigation
Open
Description
What changes upstream
pingdotgg#21299, "fix(server): agent-browser and Chrome no longer outlive the agent that started them", is open and mergeable. It was rebuilt by a maintainer from a contributor's work, and it is marked as needing human approval before merge.
The PR changes the AgentScope contract in packages/shared/src/AgentScope.ts:
wrapreturns{ command, args, unit }.unitis the systemd scope the agent runs in.- A new
stop(unit)stops that scope after Claude, ACP, Pi or Muse releases its agent: on Stop, on a CLI restart, and on the 30-minute idle release. Detached children that calledsetsid, such as tool daemons and Chrome, are reaped with it. - Codex, OpenCode, Cursor, Grok's own cgroup and persistent terminals keep their current ownership.
Why it matters for the overlay
- Row 8 would silently disable the new cleanup.
apps/server/src/lazurio/agentBrowserSession.tsdecorates AgentScope. For a thread-bound agent it returns a new object,{ command: "/usr/bin/env", args: [...] }, instead of spreading the inner launch. With fix(server): agent-browser and Chrome no longer outlive the agent that started them pingdotgg/t3code#21299 that dropsunit. The adapter then has no scope to stop, so on Linux the agent's detached children outlive it again, and nothing fails loudly.- Fix when rebuilding: return
{ ...launch, command: "/usr/bin/env", args: [...] }. - Add a test that a
unitfrom the inner scope survives the decorator. The existingrecordingAgentScopeinagentBrowserSession.test.tscan return one. - If the per-thread variable moves into the adapters' environment builders, as the upstream offer for [Feature]: Expose current thread info via environment variables pingdotgg/t3code#6781 proposes, the decorator goes away together with the risk.
- Fix when rebuilding: return
- Row 12 overlaps.
apps/server/src/lazurio/threadLifecycle.tsstops a thread's agent-browser daemon when the thread is archived or deleted. With fix(server): agent-browser and Chrome no longer outlive the agent that started them pingdotgg/t3code#21299, upstream already reaps the daemon when the agent is released, and earlier: on Stop and on idle release. Check whether row 12 still needs its own daemon stop. Its other half, letting go of the thread's Environment browser tabs, stays. - Behaviour change for agents on an Environment. After fix(server): agent-browser and Chrome no longer outlive the agent that started them pingdotgg/t3code#21299, anything an agent starts in the background ends with its agent: dev servers,
agent-browsersessions, watchers. Agents on a Lazurio Environment keep working through the shared Environment browser, which runs outside the agent's scope and is not affected. But a dev server an agent left running for a person would stop when the agent goes idle. Note this in the runbook and in the people's announcement when the rebuild takes in fix(server): agent-browser and Chrome no longer outlive the agent that started them pingdotgg/t3code#21299.
When
- At the next rebuild or upstream refresh that contains fix(server): agent-browser and Chrome no longer outlive the agent that started them pingdotgg/t3code#21299 (upstream 0.1.1 or later, if it merges).
- Until then, nothing to do. The contract on
main9e506c8 still matches upstream v0.1.0.
Found while preparing the upstream offers of the v0.1.0 rebuild (#70, stage 9).
Metadata
Metadata
Assignees
Labels
No labels
Activity
immakermatty commentedon Oct 21, 2026
The v0.1.1 candidate (#103, row 8 commit
db957e5712) now carries the fix this issue asks for at the next rebuild:{ ...launch, command: "/usr/bin/env", args: [...] }, so any field upstream adds to its launch, such as the systemd unit of upstream fix(server): agent-browser and Chrome no longer outlive the agent that started them pingdotgg/t3code#21299, passes through. A new test checks that an extra field of the inner launch survives.sharedflag (fix(server): keep the shared Codex app-server scope alive after a tool OOM kill pingdotgg/t3code#18329) instead of the overlay's name list.pingdotgg#21299 is still not in upstream v0.1.1, so this issue stays open. When it lands, re-check that
stop(unit)still works through/usr/bin/env(env execs, so the PID and the scope stay the agent's), and re-evaluate row 12's daemon stop.feat(server): each thread's provider processes get its agent-browser …
feat(server): archiving or deleting a thread lets go of its tabs and …
immakermatty commentedon Oct 29, 2026
Checked again in the v0.1.4 rebuild (#143, PR #144, head
246a4e0bdd):{ ...launch, command: "/usr/bin/env", args: [...] }and passes...inner, so upstream'sunitandstopsurvive (apps/server/src/lazurio/agentBrowserSession.ts).agentBrowserSession.test.tsasserts that aunitfrom the inner scope survives and thatstop(unit)reaches the inner scope.stopends the agent when it is released, not when its thread is archived or deleted, and the row also lets go of the thread's Environment browser tabs.Both points of this issue are covered on v0.1.4. What remains is the canary check that the Environment browser's window and tabs outlive an agent's scope (stage 7 of the next real rebuild).
— T3 Release (bot)