Problems
1. worktree_strategy: "delegate" not supported
The dev-agent-routing skill uses:
worktree_strategy: 'delegate' // plugin creates worktree automatically
But the WorktreeStrategyEnum only has "auto" and "off". Any delegate value causes a schema validation error from OpenClaw before the tool even runs. delegate should be an alias for auto (the plugin IS doing the worktree creation).
2. No validation: auto strategy without branch
When worktree_strategy === "auto" but branch is not provided, the code silently falls through and works in the original workdir without creating a worktree. The user intended isolation and gets none — a silent footgun.
// current — silently no-ops on worktree creation when branch is missing
if (worktreeStrategy === 'auto' && params.branch) {
...
}
Should return an error if auto is requested without a branch.
3. Sessions never pruned from memory
The in-memory Map<string, ManagedSession> in SessionManager accumulates indefinitely. Long-running OpenClaw gateway processes will grow without bound. Completed sessions older than ~24h should be pruned automatically.
Fix
- Add
"delegate" as an alias for "auto" in WorktreeStrategyEnum
- Return
{ error: ... } when strategy === "auto" || "delegate"" but branch` is absent
- Add a background pruning interval to
SessionManager that removes sessions ended >24h ago
Problems
1.
worktree_strategy: "delegate"not supportedThe
dev-agent-routingskill uses:But the
WorktreeStrategyEnumonly has"auto"and"off". Anydelegatevalue causes a schema validation error from OpenClaw before the tool even runs.delegateshould be an alias forauto(the plugin IS doing the worktree creation).2. No validation:
autostrategy withoutbranchWhen
worktree_strategy === "auto"butbranchis not provided, the code silently falls through and works in the originalworkdirwithout creating a worktree. The user intended isolation and gets none — a silent footgun.Should return an error if
autois requested without a branch.3. Sessions never pruned from memory
The in-memory
Map<string, ManagedSession>inSessionManageraccumulates indefinitely. Long-running OpenClaw gateway processes will grow without bound. Completed sessions older than ~24h should be pruned automatically.Fix
"delegate"as an alias for"auto"inWorktreeStrategyEnum{ error: ... }whenstrategy === "auto" || "delegate"" butbranch` is absentSessionManagerthat removes sessions ended >24h ago