Skip to content

Commit c615760

Browse files
committed
Disable timeout for Claude CLI commands in launchClaude and related tests
1 parent 4d62555 commit c615760

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/utils/claude.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ describe('claude utils', () => {
120120
['-p', '--add-dir', '/tmp'],
121121
expect.objectContaining({
122122
input: prompt,
123-
timeout: 1200000, // 20 minutes
123+
timeout: 0, // Disabled timeout
124124
})
125125
)
126126
})
@@ -220,7 +220,7 @@ describe('claude utils', () => {
220220
['-p', '--add-dir', workspacePath, '--add-dir', '/tmp'],
221221
expect.objectContaining({
222222
input: prompt,
223-
timeout: 1200000,
223+
timeout: 0,
224224
cwd: workspacePath,
225225
})
226226
)
@@ -242,7 +242,7 @@ describe('claude utils', () => {
242242
['-p', '--add-dir', '/tmp'],
243243
expect.objectContaining({
244244
input: prompt,
245-
timeout: 1200000,
245+
timeout: 0,
246246
})
247247
)
248248

@@ -294,7 +294,7 @@ describe('claude utils', () => {
294294
['--add-dir', '/tmp', '--', prompt],
295295
expect.objectContaining({
296296
stdio: 'inherit',
297-
timeout: 1200000
297+
timeout: 0
298298
})
299299
)
300300
})

src/utils/claude.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export async function launchClaude(
5353
prompt: string,
5454
options: ClaudeCliOptions = {}
5555
): Promise<string | void> {
56-
const { model, permissionMode, addDir, headless = false, timeout = 1200000 } = options
56+
const { model, permissionMode, addDir, headless = false } = options
5757

5858
// Build command arguments
5959
const args: string[] = []
@@ -81,7 +81,7 @@ export async function launchClaude(
8181
// Headless mode: capture and return output
8282
const result = await execa('claude', args, {
8383
input: prompt,
84-
timeout,
84+
timeout: 0, // Disable timeout for long responses
8585
...(addDir && { cwd: addDir }), // Run Claude in the worktree directory
8686
// verbose: true,
8787
})
@@ -95,7 +95,7 @@ export async function launchClaude(
9595
await execa('claude', [...args, '--', prompt], {
9696
...(addDir && { cwd: addDir }),
9797
stdio: 'inherit', // Let user interact directly in current terminal
98-
timeout,
98+
timeout: 0, // Disable timeout
9999
})
100100

101101
return

0 commit comments

Comments
 (0)