Skip to content

Deprecate exit_code and status_message in the Actor constructor #1186

Open

Description

@vdusek

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.

✍️ Drafted by Claude Code

Activity

  1. added
    bugSomething isn't working.
    t-toolingIssues with this label are in the ownership of the tooling team.
    on Oct 16, 2026
  2. assigned and unassigned on Oct 16, 2026
  3. added this to the 5.0 milestone on Oct 16, 2026
  4. 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working.t-toolingIssues with this label are in the ownership of the tooling team.

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions