Skip to content

Commit 7557a33

Browse files
Taoidleclaude
andcommitted
fix: add --dangerously-skip-permissions flag for Claude Code backend
When using Claude Code CLI in non-interactive mode (--print), write/edit operations require permission bypass. Without this flag, Claude Code would prompt for permissions which cannot be handled in subprocess mode. Added skip_permissions parameter (default: True) to ClaudeCodeBackend that adds --dangerously-skip-permissions to CLI commands. Bump version to 4.0.1 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent a3b85f5 commit 7557a33

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "plan-cascade",
3-
"version": "4.0.0",
3+
"version": "4.0.1",
44
"description": "Three-layer cascaded parallel development framework with multi-agent collaboration. Breaks down projects into Features (Mega Plan), Features into Stories (Hybrid Ralph), with dependency-driven batch execution, Git Worktree isolation, and support for multiple AI agents (Codex, Amp, Aider, etc.).",
55
"author": {
66
"name": "Taoidle",

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "plan-cascade"
7-
version = "4.0.0"
7+
version = "4.0.1"
88
description = "Plan Cascade - Three-layer parallel development framework for AI coding tools"
99
readme = "README.md"
1010
license = {text = "MIT"}

src/plan_cascade/backends/claude_code.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ def __init__(
5050
claude_path: str = "claude",
5151
project_root: Path | None = None,
5252
output_format: str = "stream-json",
53+
skip_permissions: bool = True,
5354
):
5455
"""
5556
Initialize the Claude Code backend.
@@ -58,11 +59,15 @@ def __init__(
5859
claude_path: Path to claude CLI (default: "claude")
5960
project_root: Project root directory
6061
output_format: Output format ("stream-json" recommended)
62+
skip_permissions: Whether to skip permission checks (default: True)
63+
This allows Claude Code to write/edit files without
64+
interactive permission prompts.
6165
"""
6266
super().__init__(project_root)
6367

6468
self.claude_path = claude_path
6569
self.output_format = output_format
70+
self.skip_permissions = skip_permissions
6671

6772
self._process: asyncio.subprocess.Process | None = None
6873
self._llm: LLMProvider | None = None
@@ -124,6 +129,10 @@ async def execute(
124129
"--include-partial-messages", # Enable true streaming output
125130
]
126131

132+
# Add permission bypass if enabled (required for non-interactive write/edit)
133+
if self.skip_permissions:
134+
cmd.append("--dangerously-skip-permissions")
135+
127136
# Add session resume if we have a session_id
128137
if self._session_id:
129138
cmd.extend(["--resume", self._session_id])
@@ -464,9 +473,14 @@ async def complete(
464473
"--output-format", "stream-json",
465474
"--verbose",
466475
"--include-partial-messages", # Enable true streaming
467-
prompt,
468476
]
469477

478+
# Add permission bypass if enabled
479+
if self.backend.skip_permissions:
480+
cmd.append("--dangerously-skip-permissions")
481+
482+
cmd.append(prompt)
483+
470484
output_text = ""
471485

472486
try:

0 commit comments

Comments
 (0)