Skip to content

Commit 93d6075

Browse files
jwaldripclaude
andcommitted
feat(plugin): block /construct in cowork mode
Construction requires full CLI capabilities (file editing, worktrees, test execution, subagent teams) that aren't available in cowork sessions. Add a pre-check that rejects cowork mode with a clear message directing the user to open a full Claude Code session. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 87ca303 commit 93d6075

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

plugin/skills/construct/SKILL.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,24 @@ If truly blocked (cannot proceed without user input):
6767

6868
## Implementation
6969

70+
### Pre-check: Reject Cowork Mode
71+
72+
Construction requires full CLI capabilities (file editing, worktrees, test execution, subagent teams). It cannot run in a cowork session.
73+
74+
```bash
75+
if [ "${CLAUDE_CODE_IS_COWORK:-}" = "1" ]; then
76+
echo "ERROR: /construct cannot run in cowork mode."
77+
echo "Construction requires a full Claude Code CLI session with file system access."
78+
echo ""
79+
echo "To continue:"
80+
echo " 1. Open Claude Code in your project directory"
81+
echo " 2. Run /construct"
82+
exit 1
83+
fi
84+
```
85+
86+
If `CLAUDE_CODE_IS_COWORK=1`, stop immediately with the message above. Do NOT proceed to any further steps.
87+
7088
### Step 0: Ensure Intent Worktree
7189

7290
**CRITICAL: The orchestrator MUST run in the intent worktree, not the main working directory.**

0 commit comments

Comments
 (0)