feat: make workflow execution timeout configurable via env var#348
Merged
danielmillerp merged 1 commit intonextfrom May 7, 2026
Merged
Conversation
bcb7272 to
1e21af5
Compare
Adds WORKFLOW_EXECUTION_TIMEOUT_SECONDS so agents whose tasks run longer than the previous hardcoded 24h cap can extend the timeout without forking the SDK. Default behavior (24h) is unchanged.
1e21af5 to
d2fbe00
Compare
smoreinis
approved these changes
May 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
WORKFLOW_EXECUTION_TIMEOUT_SECONDSenvironment variable that controls the Temporalexecution_timeoutused whenTemporalTaskService.submit_taskstarts an agent's workflow.WORKFLOW_EXECUTION_TIMEOUT_SECONDS=1209600for 14 days.Why
Previously the SDK hardcoded
execution_timeout=timedelta(seconds=86400)as the default inTemporalClient.start_workflow, andTemporalTaskService.submit_taskdid not override it. Any agent intended to run longer than 24h would have its workflow forcibly timed out by Temporal even when the agent's own internal task timeout was longer.Per Temporal's documented guidance, Workflow Execution Timeout has no upper bound — workflows are designed to be long-running — so increasing the cap is safe.
Test plan
submit_task's execution_timeout argument before this change; behavior preserved by the 86400 default).WORKFLOW_EXECUTION_TIMEOUT_SECONDSset to a longer value and confirm the TemporalWorkflowExecutionTimeoutreflects the override.🤖 Generated with Claude Code
Greptile Summary
WORKFLOW_EXECUTION_TIMEOUT_SECONDSenv var (default86400, validatedgt=0) so agents with long-running workflows can raise the Temporal execution timeout without code changes.TemporalTaskService.submit_taskviaexecution_timeout=timedelta(seconds=...), preserving the previous 24 h default for existing deployments.nextbranch.Confidence Score: 5/5
Safe to merge — changes are minimal, backwards-compatible, and correctly validated.
All three changed files are clean: the new env var has proper gt=0 Pydantic validation (addressing the previously flagged concern), the timeout is wired correctly into Temporal's start_workflow, and the CI change is intentional. No P0 or P1 issues found.
No files require special attention.
Important Files Changed
Sequence Diagram
sequenceDiagram participant Env as EnvironmentVariables participant TTS as TemporalTaskService participant TC as TemporalClient participant T as Temporal Server Note over Env: WORKFLOW_EXECUTION_TIMEOUT_SECONDS loaded from env (default 86400, gt=0) TTS->>Env: read WORKFLOW_EXECUTION_TIMEOUT_SECONDS TTS->>TC: "start_workflow(..., execution_timeout=timedelta(seconds=N))" TC->>T: "StartWorkflowExecution (WorkflowExecutionTimeout = N s)" T-->>TC: workflow_id TC-->>TTS: workflow_idReviews (3): Last reviewed commit: "feat: make workflow execution timeout co..." | Re-trigger Greptile