Skip to content

Zombie child processes: browser.go calls Start() without Wait(), leaking defunct processes per URL open #3630

Description

@aheritier

Summary

Opening a URL/browser leaves a permanent zombie (<defunct>) child process. A long-running session was observed with 5 zombie children parented to the docker-agent process.

Root cause

pkg/browser/browser.go calls exec.CommandContext(...).Start() but never calls Wait(), so the child is never reaped after it exits and remains a zombie.

Triggers

Every browser/URL open path, including MCP OAuth handshakes, TUI open-link, and the open_url tool. Five zombies correlated with five browser opens.

Proposed fix

Reap the child asynchronously, following the existing pattern in pkg/board/app.go:

go func() { _ = cmd.Wait() }()

Impact

Accumulating zombies consume PIDs and indicate missing process lifecycle management; over long sessions this can contribute to process-table pressure.

Metadata

Metadata

Assignees

Labels

area/mcpMCP protocol, MCP tool servers, integrationarea/toolsFor features/issues/fixes related to the usage of built-in and MCP toolsarea/tuiFor features/issues/fixes related to the TUIkind/fixPR fixes a bug (maps to fix:). Use on PRs only.

Type

Fields

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions