From 84ddf5ab75bb62fb706f419e7e8381d52cf89eb5 Mon Sep 17 00:00:00 2001 From: Arjun Malleswaran Date: Mon, 9 Feb 2026 10:58:03 -0800 Subject: [PATCH] fix: extend heartbeat timeout to prevent stalls during sub-agent execution (#108) * fix: extend heartbeat timeout to prevent stalls during sub-agent execution * feat: add /pr command for creating pull requests with conventional commits --- .claude/commands/pr.md | 32 ++++++++++++++++++++++++++++++++ src/temporal/workflows.ts | 6 +++--- 2 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 .claude/commands/pr.md diff --git a/.claude/commands/pr.md b/.claude/commands/pr.md new file mode 100644 index 0000000..a089c59 --- /dev/null +++ b/.claude/commands/pr.md @@ -0,0 +1,32 @@ +--- +description: Create a PR to main branch using conventional commit style for the title +--- + +Create a pull request from the current branch to the `main` branch. + +First, analyze the current branch to understand what changes have been made: +1. Run `git log --oneline -10` to see recent commit history and understand commit style +2. Run `git log main..HEAD --oneline` to see all commits on this branch that will be included in the PR +3. Run `git diff main...HEAD --stat` to see a summary of file changes + +Then generate a PR title that: +- Follows conventional commit format (e.g., `fix:`, `feat:`, `chore:`, `refactor:`) +- Is concise and accurately describes the changes +- Matches the style of recent commits in the repository + +Generate a PR body with: +- A `## Summary` section with 1-3 bullet points describing the changes + +Finally, create the PR using the gh CLI: +``` +gh pr create --base main --title "" --body "$(cat <<'EOF' +## Summary + +EOF +)" +``` + +IMPORTANT: +- Do NOT include any Claude Code attribution in the PR +- Keep the summary concise (1-3 bullet points maximum) +- Use the conventional commit prefix that best matches the changes (fix, feat, chore, refactor, docs, etc.) diff --git a/src/temporal/workflows.ts b/src/temporal/workflows.ts index 1165b94..d7d16b0 100644 --- a/src/temporal/workflows.ts +++ b/src/temporal/workflows.ts @@ -70,14 +70,14 @@ const TESTING_RETRY = { // Activity proxy with production retry configuration (default) const acts = proxyActivities({ startToCloseTimeout: '2 hours', - heartbeatTimeout: '10 minutes', // Long timeout for resource-constrained workers with many concurrent activities + heartbeatTimeout: '60 minutes', // Extended for sub-agent execution (SDK blocks event loop during Task tool calls) retry: PRODUCTION_RETRY, }); // Activity proxy with testing retry configuration (fast) const testActs = proxyActivities({ - startToCloseTimeout: '10 minutes', - heartbeatTimeout: '5 minutes', // Shorter for testing but still tolerant of resource contention + startToCloseTimeout: '30 minutes', + heartbeatTimeout: '30 minutes', // Extended for sub-agent execution in testing retry: TESTING_RETRY, });