# Feature request: add a configurable timeout to anna.tools.invoke

**URL:** <https://forum.anna.partners/t/feature-request-add-a-configurable-timeout-to-anna-tools-invoke/36>\
**Category:** Developers\
**Tags:** dev-kit, executa\
**Created:** [May 25, 2026, 11:42am UTC](https://forum.anna.partners/t/feature-request-add-a-configurable-timeout-to-anna-tools-invoke/36 "2026-05-25T11:42:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![HappyLight](https://avatars.discourse-cdn.com/v4/letter/h/7feea3/32.png) [@HappyLight](https://forum.anna.partners/u/HappyLight)\
**Post date:** [May 25, 2026, 11:42am UTC](https://forum.anna.partners/t/feature-request-add-a-configurable-timeout-to-anna-tools-invoke/36/1 "2026-05-25T11:42:07Z")

</div>

Hi Anna team,

I would like to request a configurable timeout option for `anna.tools.invoke` in Anna App frontends.

## Context

I am building an Anna App where the frontend calls an Executa tool with:

```javascript
await anna.tools.invoke({

tool_id,

method,

args,

});

```

Inside the backend tool, the tool may call Anna LLM sampling or another LLM-backed workflow. That backend-side LLM call can have its own timeout or retry policy, but the frontend-to-tool invocation currently appears to have a fixed host/runtime timeout. When the backend work takes longer than that, the `tools.invoke` chain fails even if the backend operation is still valid and intentionally long-running.

The workaround is to redesign the tool as an asynchronous job API: start a job, return immediately, then have the frontend poll `get_status` / `get_result`. That pattern works, but it adds a fair amount of frontend and backend boilerplate for cases where the developer simply wants one longer-running tool call.

## Request

Could `anna.tools.invoke` accept an optional timeout parameter, for example:

```javascript
await anna.tools.invoke({

tool_id,

method,

args,

timeoutMs: 180_000,

});

```

or an equivalent option shape:

```javascript
await anna.tools.invoke(

{ tool_id, method, args },

{ timeoutMs: 180_000 }

);

```

The important part is that the app frontend can request a longer timeout for known long-running tool calls, while the platform can still enforce a maximum allowed value.

## What I observed locally

In my local environment:

- `@anna-ai/cli`: `0.1.14`

- pinned local runtime: `anna-app-runtime-local@0.2.0a2`

- current docs/examples show `tools.invoke` args as `{ tool_id, method?, args }`, with no timeout option

From the local runtime source I found that the local Executa JSON-RPC wait uses a fixed default:

```python
async def _rpc(…, timeout: float = 65.0):

return await asyncio.wait_for(fut, timeout=timeout)

```

So the effective behavior seems to be a fixed ~65 second limit in local development. I am not sure whether production uses exactly the same value, but the public App UI Host API currently does not appear to expose any frontend-controlled timeout for `tools.invoke`.

## Why this would help

A configurable timeout would make it much easier to build Anna Apps that delegate substantial work to an Executa tool, especially workflows involving LLM planning, summarization, retrieval, report generation, or multi-step processing. Developers could still choose the async job/polling model when it is the better UX, but they would not be forced into that architecture solely because the frontend invoke timeout is fixed.

Thanks for considering this.

---

<div class="post-metadata">

**Author:** ![hunter](https://yyz1.discourse-cdn.com/flex033/user_avatar/forum.anna.partners/hunter/32/8_2.png) [@hunter](https://forum.anna.partners/u/hunter)\
**Post date:** [May 27, 2026, 9:29am UTC](https://forum.anna.partners/t/feature-request-add-a-configurable-timeout-to-anna-tools-invoke/36/2 "2026-05-27T09:29:07Z")

</div>

This support has been added!

For details, please refer to:  
/developers/reference/host-api-tools/tools-invoke

---

<div class="post-metadata">

**Author:** ![hunter](https://yyz1.discourse-cdn.com/flex033/user_avatar/forum.anna.partners/hunter/32/8_2.png) [@hunter](https://forum.anna.partners/u/hunter)\
**Post date:** [May 27, 2026, 9:30am UTC](https://forum.anna.partners/t/feature-request-add-a-configurable-timeout-to-anna-tools-invoke/36/3 "2026-05-27T09:30:16Z")

</div>



---

<div class="post-metadata">

**Author:** ![hunter](https://yyz1.discourse-cdn.com/flex033/user_avatar/forum.anna.partners/hunter/32/8_2.png) [@hunter](https://forum.anna.partners/u/hunter)\
**Post date:** [May 27, 2026, 11:06am UTC](https://forum.anna.partners/t/feature-request-add-a-configurable-timeout-to-anna-tools-invoke/36/4 "2026-05-27T11:06:42Z")

</div>


