Skip to content

simulation: don't start the worker HTTP server - #6055

Merged
theomonnom merged 1 commit into
mainfrom
theo/simulation-no-http-server
Jun 11, 2026
Merged

simulation: don't start the worker HTTP server#6055
theomonnom merged 1 commit into
mainfrom
theo/simulation-no-http-server

Conversation

@theomonnom

Copy link
Copy Markdown
Member

Summary

Running two lk agent simulate sessions concurrently fails with "address already in use": each launched worker bound the health/debug HTTP server on the same fixed port.

Under --simulation the worker is ephemeral and CLI-supervised — nothing scrapes its health endpoint — so the server is now simply not created. http_port registration and shutdown already handled the None case.

🤖 Generated with Claude Code

Simulations launch ephemeral workers side by side; a health endpoint on
a fixed port made concurrent runs fail with 'address already in use'.
@chenghao-mou
chenghao-mou requested a review from a team June 11, 2026 06:52

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

@theomonnom
theomonnom merged commit a236c53 into main Jun 11, 2026
27 checks passed
@theomonnom
theomonnom deleted the theo/simulation-no-http-server branch June 11, 2026 16:24
u9g added a commit to livekit/agents-js that referenced this pull request Jun 17, 2026
…agent name override)

Add a simulation flag to worker options, derived from the connect-room CLI
path. In simulation mode: skip worker HTTP server creation/start/close so
concurrent runs don't collide on a fixed port, disable the worker load limit
(loadThreshold = Infinity) so runs can saturate the agent, and resolve
agentName from LIVEKIT_AGENT_NAME_OVERRIDE first so lk simulate dispatch
matches.

Ported from livekit/agents#6055
u9g added a commit to livekit/agents-js that referenced this pull request Jun 17, 2026
…agent name override)

Add a --simulation CLI flag (on the start command, set by `lk simulate`) that
threads through to worker options. In simulation mode: skip worker HTTP server
creation/start/close so concurrent runs don't collide on a fixed port, disable
the worker load limit (loadThreshold = Infinity) so runs can saturate the
agent, and resolve agentName from LIVEKIT_AGENT_NAME_OVERRIDE first so lk
simulate dispatch matches.

Ported from livekit/agents#6055
u9g added a commit to livekit/agents-js that referenced this pull request Jun 25, 2026
…agent name override)

Add a --simulation CLI flag (on the start command, set by `lk simulate`) that
threads through to worker options. In simulation mode: skip worker HTTP server
creation/start/close so concurrent runs don't collide on a fixed port, disable
the worker load limit (loadThreshold = Infinity) so runs can saturate the
agent, and resolve agentName from LIVEKIT_AGENT_NAME_OVERRIDE first so lk
simulate dispatch matches.

Ported from livekit/agents#6055
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants