pub(super) fn is_owned_by_agent(
mstore: &Store,
shell_id: &str,
agent_block_id: &str,
) -> boolExpand description
Whether shell_id is a real view:"term" sub-block PARENTED TO
agent_block_id — the actual safety property Codex asked for (PR
#3177): shell_id lives in the same block-id namespace as every other
pane, and Layout exposes block ids for ordinary panes, so without this
check an agent could point PtyShellInput/PtyShellStop/etc. at any
controller-backed block (another agent’s own CLI pane, a human’s
terminal pane) and inject input into it or tear it down. Framed as
parentage rather than “did PtyShell create it” (the original,
narrower check) specifically so it also covers the reuse case above: a
shell the HUMAN created via the drawer is just as legitimate a target as
one PtyShell created itself, as long as it’s this agent’s own pane.