You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Deprecate exit_code and status_message in the Actor constructor #1186
The Actor constructor accepts exit_code and status_message (_actor.py#L125-L154). Both describe how the run ends, which isn't known when the Actor is created. They also don't reliably reach the end of the run: Actor.exit() assigns its own defaults, so a bare await Actor.exit() resets them to 0 and None (#L511-L533). Only the async with Actor(...) path keeps them. The JS SDK takes these values only in exit().
Keeping the constructor values through exit() would need a "not passed" marker for every exit() argument, since None is already meaningful for status_message and event_listeners_timeout. #1190 tried that and was closed: it puts a private type into the public signatures for values that shouldn't be set in the constructor.
Acceptance criteria
Passing exit_code or status_message to Actor(...) emits a DeprecationWarning pointing to Actor.exit() / Actor.fail() (or Actor.exit_code / Actor.status_message with the context manager).
Both parameters are removed in the next major version and listed in its upgrading guide.
changed the title [-]Actor.exit() overwrites exit code and status message set earlier[/-][+]Deprecate exit_code and status_message in the Actor constructor[/+]on Oct 16, 2026
Activity
[-]Actor.exit() overwrites exit code and status message set earlier[/-][+]Deprecate exit_code and status_message in the Actor constructor[/+]