mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-10 00:03:54 +00:00
The previous implementation split on ':subagent:' which requires colons on both sides. Legacy session keys like 'subagent:worker' (starting without a colon) were missed and returned depth 0. Fix: normalize key, match (^|:)subagent: pattern to correctly count nested subagent levels for both legacy and current key formats. - Add test cases for legacy key formats Co-authored-by: Vincent Koc <vincentkoc@ieee.org>