Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/ai-providers/agent-sdk/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ export async function askAgentSdk(
const isOAuthMode = loginMethod === 'claudeai'

const env: Record<string, string | undefined> = { ...process.env }
// Prevent "nested session" detection when launched from within Claude Code
delete env.CLAUDECODE
if (isOAuthMode) {
// Force OAuth by removing any inherited API key
delete env.ANTHROPIC_API_KEY
Expand Down