Thread-bound subagent spawning — one of OpenClaw's most useful multi-channel features — gets a significant simplification in PR #75943, merged today by steipete. The change replaces split settings across subagent and ACP spawn flows with a single threadBindings.spawnSessions config, and adds default spawn context and parent-fork fallback that works consistently across Discord, Telegram, Matrix, and LINE.
What Changed
Previously, controlling subagent behavior in thread-bound contexts required separate settings scattered across different spawn paths. PR #75943 consolidates this under threadBindings.spawnSessions — a single config point at the account level.
Beyond consolidation, the PR adds:
- Default spawn context — operators can now set
threadBindings.defaultSpawnContextper account to control whether spawned sessions inherit the parent transcript (fork) or start isolated. - Parent-fork fallback — when no explicit spawn context is configured, the system defaults to the parent-fork path, preserving prior behavior.
- Legacy config migration — existing configs using the old split settings are automatically migrated to the new schema on upgrade.
Channel support covers Discord, Telegram, Matrix, LINE, and the Bonjour local-network plugin.
A Security Finding Worth Noting
The Codex automated review flagged a P2 security issue before merge: when a Discord defaultAccount is configured and a caller omits agentAccountId, the spawn context lookup resolves against the raw requester account rather than the effective channel account. This means a defaultSpawnContext: "isolated" policy can be bypassed in that specific scenario, leaving the child session in fork mode.
The PR shipped with this documented as a known "remaining risk" — the isolation bypass requires a specific Discord default-account configuration to trigger, and a follow-up fix is expected. The relevant location is src/agents/subagent-spawn.ts:568 if you want to track the repair.
This is a good illustration of OpenClaw's development approach: ship the consolidation, document the edge case, fix it next. The regression test coverage targets extensions/discord/src/subagent-hooks.test.ts and src/agents/subagent-spawn.context.test.ts.
Practical Impact
For operators running multi-channel bots where thread isolation matters — Discord servers using per-thread subagents for ticketing, support, or onboarding; Telegram groups with per-conversation agents — the config story is now much cleaner. One account-level setting replaces hunting across multiple spawn-path configs.
The threadBindings config docs are updated alongside the schema changes. This lands in main today and ships in the next tagged release after v2026.4.29.
