diff --git a/docs/refactor/2025-11-26-auto-reply-split.md b/docs/refactor/2025-11-26-auto-reply-split.md index b329d4fbe..9d10af786 100644 --- a/docs/refactor/2025-11-26-auto-reply-split.md +++ b/docs/refactor/2025-11-26-auto-reply-split.md @@ -5,6 +5,7 @@ - Audio transcription helpers live in `src/auto-reply/transcription.ts`. - Shared reply types live in `src/auto-reply/types.ts` (re-exported from `reply.ts`). - `runCommandReply` now returns `{ payload, meta }`, supports injected enqueue runners for tests, logs structured metadata, and respects `mediaMaxMb` for local media paths. +- Timeout messaging now includes `cwd` when provided to speed up debugging slow commands. - Added focused tests: - `src/auto-reply/command-reply.test.ts` exercises Claude flag injection, session args, timeout messaging, media token handling, and Claude metadata reporting. - `src/auto-reply/transcription.test.ts` covers media download + transcription command invocation. diff --git a/src/auto-reply/command-reply.ts b/src/auto-reply/command-reply.ts index af8b00c17..75ede80db 100644 --- a/src/auto-reply/command-reply.ts +++ b/src/auto-reply/command-reply.ts @@ -341,7 +341,7 @@ export async function runCommandReply( ); const baseMsg = "Command timed out after " + - `${timeoutSeconds}s. Try a shorter prompt or split the request.`; + `${timeoutSeconds}s${reply.cwd ? ` (cwd: ${reply.cwd})` : ""}. Try a shorter prompt or split the request.`; const partial = errorObj.stdout?.trim(); const partialSnippet = partial && partial.length > 800 ? `${partial.slice(0, 800)}...` : partial;