Skip to content

[Bug]: Wait timing optimization #183

@yaythomas

Description

@yaythomas

Expected Behavior

const resultPromise = context.step(async () => {
    await new Promise((resolve) => setTimeout(resolve, 7000));
    return "step completed";
});
await context.wait("wait-1", { seconds: 10 });
const result = await resultPromise; // Re-invokes after 10s, rather than 3s

For this example real backend reinvokes after 3s.

Actual Behavior

The function is re-invoked after the full wait duration of 10s instead of the remaining time (3s).

Steps to Reproduce

See above

SDK Version

Python Version

3.13

Is this a regression?

No

Last Working Version

No response

Additional Context

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions