ocpipe 0.5.17 → 0.5.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/claude-code.ts +8 -0
package/package.json
CHANGED
package/src/claude-code.ts
CHANGED
|
@@ -185,10 +185,18 @@ export async function runClaudeCodeAgent(
|
|
|
185
185
|
)
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
+
// Strip CLAUDECODE env var to allow nested Claude Code sessions.
|
|
189
|
+
// The parent session sets this to block nesting, but SDK-spawned subagents
|
|
190
|
+
// are independent processes that should be allowed to run.
|
|
191
|
+
const cleanEnv = Object.fromEntries(
|
|
192
|
+
Object.entries(process.env).filter(([key]) => key !== 'CLAUDECODE'),
|
|
193
|
+
)
|
|
194
|
+
|
|
188
195
|
const queryOptions: Options = {
|
|
189
196
|
model: modelStr,
|
|
190
197
|
permissionMode,
|
|
191
198
|
abortController,
|
|
199
|
+
env: cleanEnv,
|
|
192
200
|
// v1 persistSession defaults to true, but set explicitly for clarity
|
|
193
201
|
persistSession: true,
|
|
194
202
|
...(workdir && { cwd: workdir }),
|