cloudflare / cloudflare/agents
Expose a Codemode execution-start hook with executionId
- Dominant language
- TypeScript
- Stars
- 5.6k
- Forks
- 711
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 53
Description
Hi, I’m Gerard, CTO at [Latitude](https://github.com/latitude-dev/latitude-llm). We encountered this while adding first-class telemetry support for Cloudflare Think and Codemode in [latitude-dev/latitude-llm#3956](https://github.com/latitude-dev/latitude-llm/pull/3956).
## Problem
Connector callbacks receive the Codemode `executionId`, but there is no public hook exposing that ID when an execution starts. This prevents telemetry integrations from associating the active parent trace context with an execution before sandbox callbacks cross the async boundary.
## Request
Add an execution/pass start hook, such as `onPassStart(executionId)`, called after the execution ID is created and before sandbox code runs. It should pair with `onPassEnd` and support concurrent executions and resumed passes.
This would let integrations store execution-scoped context by ID and safely recover it from connector callbacks.
Contributor guide
Assessment
This issue has not been assessed yet.