mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-02 14:21:34 +00:00
* 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