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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ocpipe",
3
- "version": "0.5.17",
3
+ "version": "0.5.18",
4
4
  "description": "SDK for LLM pipelines with OpenCode and Zod",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -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 }),