@openagents-org/agent-launcher 0.2.113 → 0.2.114
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/adapters/claude.js +12 -3
package/package.json
CHANGED
package/src/adapters/claude.js
CHANGED
|
@@ -390,10 +390,19 @@ class ClaudeAdapter extends BaseAdapter {
|
|
|
390
390
|
let mcpConfigFile = null;
|
|
391
391
|
let cmd;
|
|
392
392
|
|
|
393
|
-
// Clean env
|
|
393
|
+
// Clean env: strip every CLAUDE_* / AI_AGENT variable inherited from a
|
|
394
|
+
// parent Claude Code (or Claude Agent SDK) process. If we don't, the
|
|
395
|
+
// spawned `claude` thinks it's running under an SDK harness and picks
|
|
396
|
+
// an org-scoped auth path that returns 403 "Account is no longer a
|
|
397
|
+
// member of the organization" even when the user is logged in fine via
|
|
398
|
+
// `claude login`. We let the child rediscover auth from
|
|
399
|
+
// ~/.claude/.credentials.json (or ANTHROPIC_API_KEY if set).
|
|
394
400
|
const cleanEnv = { ...(this.agentEnv || process.env) };
|
|
395
|
-
|
|
396
|
-
|
|
401
|
+
for (const k of Object.keys(cleanEnv)) {
|
|
402
|
+
if (k.startsWith('CLAUDE_') || k === 'CLAUDECODE' || k === 'AI_AGENT') {
|
|
403
|
+
delete cleanEnv[k];
|
|
404
|
+
}
|
|
405
|
+
}
|
|
397
406
|
|
|
398
407
|
// Run up to 2 attempts: first with session resume, then fresh if stale session detected
|
|
399
408
|
let _shouldRetry = false;
|