Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

daemon start reports DAEMON_CONNECTION_LOST for a daemon that never came up

Open
#684 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript
Domain
cli

Research direction

Start by reading the auto-launch polling path in src/cli/index.ts:239 and the HTTP-start failure path in src/daemon/main.ts:660; compare the error definitions in docs/CLI.md:132 and :498, and review the related discussion in #672. Done means auto-launch failures, including a daemon that stops before becoming available, are reported consistently as failed starts rather than as a lost live connection.

Written by the indexing model from the issue text.

Description

bug:new

simlock daemon start sometimes reports DAEMON_CONNECTION_LOST for a daemon that never came
up, instead of a failed start.

With the daemon's HTTP port held by another process (so the daemon claims its unix socket,
answers the CLI's hello, then stops itself on http-start-failed at
src/daemon/main.ts:660), most runs report the auto-launch timeout, and some report:

{"error":{"code":"DAEMON_CONNECTION_LOST","message":"Daemon connection closed"}}

exit 1, after ~240 ms. 4 of 22 direct daemon start runs at 24ce3d5a took that shape, plus
one of three console-lane runs (worker mode, fake driver, the daemon's HTTP port held); the rest
gave Timed out starting simlock daemon.

docs/CLI.md:132 defines that code as "the thing you were talking to went away" and
docs/CLI.md:498 as a live connection that died, leaving the lease standing. daemon start
never had a daemon to lose, so the line names no fact about the start: it reads as though a
running daemon died under the command. A script cannot tell a failed start from a lost daemon.

The connection is the CLI's own poll hitting the socket in the window before the dying daemon
releases it (src/cli/index.ts:239), so which of the two lines a start reports is left to
timing. Twice on a build of bd664e22 the same start instead exited 13 with
Warning: Detected unsettled top-level await and no cause; it did not reproduce on a build of
the tip. #672 already disputes the code the timeout path reports; a fix that classifies
auto-launch failures should cover these paths too.

Found while triaging #673.

Written by an agent.

Dominant language
TypeScript
Stars
20
Forks
2
Avg merge
7h 26m
Merged PRs (30d)
253

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from callstackincubator/simlock

All issues in callstackincubator/simlock

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.