# Soften the hardcoded workflow timeout or make it configurable

**URL:** <https://meta.discourse.org/t/soften-the-hardcoded-workflow-timeout-or-make-it-configurable/417789>\
**Category:** Feature\
**Tags:** workflows\
**Created:** [19 בנובמבר,‏ 2026,‏ 2:15am UTC](https://meta.discourse.org/t/soften-the-hardcoded-workflow-timeout-or-make-it-configurable/417789 "2026-11-19T02:15:38Z")\
**Posts on this page:** 1\
**Page:** 1

## סיכום מבוסס בינה מלאכותית

In this [Feature](/t/-/417789/1) discussion tagged **workflows**, user [mcwumbly](/t/-/417789/1) addresses a limitation when migrating logic from agent nodes to code-based workflows. While this transition offers significant benefits—such as reduced token usage, faster execution, and more predictable behavior—it introduced a new obstacle: a hardcoded sandbox execution timeout of 1000ms. [mcwumbly](/t/-/417789/1) notes that previous workflows relying on agent nodes exceeded this duration without issue, suggesting agent node execution times are calculated differently.

The issue arises specifically when using loops to process large datasets in batches from an external source. Although the loop structure allows for smooth batch processing, applying a global timeout to the entire workflow becomes problematic for these extended operations. [mcwumbly](/t/-/417789/1) points to the source code where this constraint is likely defined: [sandbox_budget.rb](https://github.com/discourse/discourse/blob/f26eb49c42b1cf0e97de2b515a1e9911fa63c7b9/plugins/discourse-workflows/lib/discourse_workflows/sandbox_budget.rb#L5-L6).

The core request is to provide a "way out" for these efficient, code-based workflows. The user suggests either softening the hardcoded timeout or making it configurable to accommodate workflows that, despite being faster than their agent-based predecessors, still require more than one second of total execution time due to loop iterations.

<div class="post-metadata">

**Author:** ![mcwumbly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcwumbly/32/103861_2.png) [@mcwumbly](https://meta.discourse.org/u/mcwumbly)\
**Post date:** [19 בנובמבר,‏ 2026,‏ 2:15am UTC](https://meta.discourse.org/t/soften-the-hardcoded-workflow-timeout-or-make-it-configurable/417789/1 "2026-11-19T02:15:38Z")

</div>

I have some workflows where I’ve been relying on agents to do a lot of heavy lifting. Recently, I’ve been porting the logic over from agent nodes that load large prompts into code.

The rationale for doing so is:

- save a _ton_ of tokens
- workflow runs are much faster
- behavior is more predictable

The agents were a great way to get things going quickly, but now I want speed and reliability.

After getting a couple of these moved over, during one test run, I hit this error for the first time:

```plaintext
Sandbox execution time exceeded 1000ms for this workflow

```

I found it surprising, because my previous workflows that relied on agent nodes took _much_ longer.

But apparently, agent node execution time is counted differently or something. I think this is where this is being set and evaluated:

> <https://github.com/discourse/discourse/blob/f26eb49c42b1cf0e97de2b515a1e9911fa63c7b9/plugins/discourse-workflows/lib/discourse_workflows/sandbox_budget.rb#L5-L6>

> <https://github.com/discourse/discourse/blob/f26eb49c42b1cf0e97de2b515a1e9911fa63c7b9/plugins/discourse-workflows/lib/discourse_workflows/sandbox_budget.rb#L14-L24>

One thing worth noting is that I’m using a loop in this workflow.

 ![Screenshot 2026-11-18 at 9.10.59 PM](https://global.discourse-cdn.com/meta/original/4X/0/7/1/071a5178a9bc3ecc7cb86673bfd87ffc335b0a93.png)

It processes things in batches from an external data source with a data set that may be quite large. The loop handles this quite well, allowing for me to configure the per-loop batch size to keep things running smoothly.

_But_, that does mean a timeout that applies to the workflow as a whole is a bit troublesome in this case.

I am not sure what the right solution is here, but I’d like to have some “way out” here and let these workflows that feel _much more efficient_ to me run without hitting this timeout.
