Skip to content

Commit fb69c41

Browse files
barkainclaude
andcommitted
fix: create delegation_active flag when delegate skill runs
The flag was referenced by require_delegation.py to bypass blocking for active delegations, but no code ever created it — the creation logic was removed in v2.0.0. Now created in the PostToolUse hook that already detects delegate invocations. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent ddf797f commit fb69c41

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

hooks/PostToolUse/remind_skill_continuation.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,13 @@ def main() -> None:
117117
_create_continuation_state("plan mode completed")
118118
return
119119

120-
# Case 2: /workflow-orchestrator:delegate invoked — zero the nudge counter
120+
# Case 2: /workflow-orchestrator:delegate invoked
121121
if tool_name in ("Skill", "SlashCommand") and _is_delegate_invocation(data):
122-
logger.debug("delegate invocation detected, zeroing violations counter")
122+
logger.debug("delegate invocation detected")
123123
_zero_violations_counter()
124+
state_dir = Path(".claude/state")
125+
state_dir.mkdir(parents=True, exist_ok=True)
126+
(state_dir / "delegation_active").touch()
124127
return
125128

126129
except (json.JSONDecodeError, KeyError, TypeError) as e:

0 commit comments

Comments
 (0)