#10350 Run multiple workers with specific environment on both
Confirmed bug: Service bindings with environment-suffixed names or environment property don't work in local multi-worker dev. Related to #11095.
Keep open - valid bug affecting multi-worker local dev with environments
Analysis Report
Issue Review: cloudflare/workers-sdk#10350
Summary
Service bindings with environment-specific names (e.g., worker-b-dev) don't work in local multi-worker dev mode when using -e=dev.
Findings
- Created: 2025-08-13
- Updated: 2025-09-30
- Version: Not specified → wrangler 4.60.0 (current)
- Component: wrangler (multi-worker dev / service bindings)
- Labels: bug
- Comments: 3
Key Evidence
Issue is valid bug: When running multiple workers locally with
-c workerA.jsonc -c workerB.jsonc -e=dev, service bindings that reference environment-suffixed names (e.g.,worker-b-dev) fail because wrangler doesn't resolve the environment suffix properly in local dev mode.Confirmed by multiple users: A second user (josefaidt) provided extensive testing in comments showing the same core issue - there's a fundamental incompatibility between:
- Type generation (requires
service: "admin"+entrypoint: "default") - Local dev (requires
service: "admin-preview"suffix, but then typegen breaks) - The
environmentproperty in service bindings doesn't resolve correctly in local dev
- Type generation (requires
Related open issues exist:
- #11095: "Cross-Process Communication breaks when specifying environment" - same root cause
- #9342: "Add support for versions in service bindings" - related feature request
No fix found:
- No merged PRs reference fixing this issue
- Issue #10350 not mentioned in wrangler CHANGELOG
- No recent PRs address multi-worker environment resolution in local dev
Third comment notes partial workaround: User josefaidt created a reproduction repo and found it worked in some scenarios, but the inconsistency between typegen and dev remains a core problem.
Recommendation
Status: KEEP OPEN
Reasoning: This is a confirmed bug affecting multi-worker local development with environments. The service binding environment property and environment-suffixed service names don't work correctly with wrangler dev. Multiple users have confirmed the issue, and no fix has been merged. The issue represents a real gap between deployed behavior (where environment suffixes work) and local dev behavior.
Action: Keep open as a valid bug. This issue is related to #11095 and may benefit from being consolidated with that issue for a unified fix to environment handling in cross-worker local dev scenarios.
Suggested Comment
This issue is still relevant. The core problem - service bindings with environment-specific names or the
environmentproperty not working correctly in local multi-worker dev - has not been fixed. This appears related to #11095 (Cross-Process Communication breaks when specifying environment). Both issues share the root cause of environments not being properly resolved when wrangler handles inter-worker communication locally.
Notes & Feedback (0)
No notes yet.