Skip to main content

Module own_instance

Module own_instance 

Source
Expand description

Which processes belong to THIS AgentMux instance.

The commit attribution log (sysinfo::log_memory_attribution) used to add up every process named agentmux* on the machine, so a stable install running beside a task dev build, or two channels, were mixed into one number. An instance is its launcher and everything under it: the launcher starts srv and the CEF host, and the host starts the GPU, utility and renderer processes. This module finds that tree from srv’s own pid, as a pure function over a process table so it can be tested without a real one. docs/specs/SPEC_INSTANCE_MEMORY_ATTRIBUTION_2026_10_18.md

Structs§

ProcNode
One row of the process table.

Functions§

own_instance_pids
The pids of the instance self_pid (srv) belongs to: the topmost agentmux* ancestor reached by walking up from srv (the launcher; srv itself when its parent isn’t AgentMux, as when it is run by hand), and every process below it. The walk stops at the first parent that isn’t agentmux*, so the terminal, task or AppImageLauncher that started the instance is not part of it. Empty when self_pid isn’t in the table.