When a parent Actor is aborted, its child runs keep going and bill against the account until they
finish on their own. There is no way to take them down with the parent.
Depends on #1127. The abort needs to know which children to abort, and after a migration only a
persisted registry still knows.
Proposal
Opt-in, off by default:
run = await Actor.start('apify/web-scraper', run_input, name='scrape-eu', abort_with_parent=True)
On Event.ABORTING the SDK aborts every tracked child run that is still active. It stays off by
default because aborting a child throws away its work, which is the caller's call to make.
This is best-effort by nature. It covers a graceful abort, where the parent is given time to run its
listeners. A hard abort, a run timeout or an OOM kill orphans the children regardless, and the fix
for that case is a parent/child link on the platform side.
Prior art
apify-orchestrator, as abortAllRunsOnGracefulAbort:
✍️ Drafted by Claude Code
When a parent Actor is aborted, its child runs keep going and bill against the account until they
finish on their own. There is no way to take them down with the parent.
Depends on #1127. The abort needs to know which children to abort, and after a migration only a
persisted registry still knows.
Proposal
Opt-in, off by default:
On
Event.ABORTINGthe SDK aborts every tracked child run that is still active. It stays off bydefault because aborting a child throws away its work, which is the caller's call to make.
This is best-effort by nature. It covers a graceful abort, where the parent is given time to run its
listeners. A hard abort, a run timeout or an OOM kill orphans the children regardless, and the fix
for that case is a parent/child link on the platform side.
Prior art
apify-orchestrator, as
abortAllRunsOnGracefulAbort:Actor.on('aborting')listener from a client constructor, with the option defaulting totrue.✍️ Drafted by Claude Code