Files
openclaw/apps/shared
Peter Steinberger 59f63ccc3b refactor: declare subagent spawn lineage explicitly so forks and dashboard chats stay spawn-capable (#112535)
* refactor(gateway): declare spawn lineage explicitly at sessions.create

Spawn depth is now a declared fact, never inferred from parentSessionKey.
sessions.create accepts an optional spawnDepth (requires parentSessionKey) that
spawn-owned creations pass; every other fresh session persists spawnDepth 0,
making operator chats and UI forks spawn-capable roots. The visible spawn tool
declares callerDepth + 1, and subagent depth recovery no longer walks
parentSessionKey, which is UI threading only.

Accepted tradeoff (documented inline): pre-upgrade visible children whose only
lineage was parentSessionKey resolve as roots; the transient population may
spawn one extra generation, still capped by maxChildrenPerAgent.

* chore(protocol): regenerate Swift gateway models for sessions.create spawnDepth
2026-07-21 23:58:19 -07:00
..