Fix "actor still initializing when getHandler() called" with containers. #3673
+56
−39
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We observed this error in production when testing containers.
This change was technically composed by Claude Code. Transcript: https://claude-workerd-transcript.pages.dev/ensure-constructed
Claude was surprisingly quick to narrow down where the problem might be, given just the error message.
However, ultimately it needed hints to figure out the actual problem, and the code it initially proposed as the fix was not very good (though its choice to use
KJ_ON_SCOPE_FAILURE
was interesting!).The code in this commit may have been written by it, but only after very explicit prompting from me on what to do.
I think I would have found and fixed the problem more quickly without Claude, but its ability to reason about the code is nevertheless impressive.