Skip to content

fix(daemon): dial the local binding with the token the daemon generates - #1676

Merged
edenreich merged 1 commit into
mainfrom
fix/daemon-client-local-token
Nov 1, 2026
Merged

edenreich merged 1 commit into
mainfrom
fix/daemon-client-local-token

Conversation

@edenreich

Copy link
Copy Markdown
Contributor

Summary

An enabled daemon binding with neither a token nor TLS client certificates uses this machine's local token, ~/.infer/daemon/binding.token, as docs/daemon.md describes. The daemon and the chat --daemon TUI filled it in, but LocalDialConfig did not. So on a machine without infer init, which seeds browser_use's fallback token, every infer daemon client command (workspaces, teleport, run, stop) was refused with ErrNoBinding while the daemon was up and listening.

LocalDialConfig now fills the local token first, so every local client agrees with the daemon on it. ErrNoBinding is left for a binding that is off, and its message says only that.

Found while testing the Tailscale mode of the session teleport example (#1674), where infer-local runs on the host with its own HOME.

Test plan

  • TestLocalDialConfigDialsWithTheBindingsCredentials: an enabled binding with no token and no client certificates now dials with the local token the daemon reads, instead of failing with ErrNoBinding
  • go test ./internal/daemon/ ./cmd/daemon/ ./internal/presentation/tui/daemonthread/ ./internal/tools/ ./cmd/chat/
  • By hand, in a fresh HOME without infer init and a daemon.yaml with only binding.enabled and a port: infer daemon, then infer daemon workspaces lists the workspaces (refused before)
  • task precommit:run

An enabled binding with neither a token nor TLS client certificates uses
this machine's local token, ~/.infer/daemon/binding.token. The daemon and
the chat --daemon TUI filled it in, but LocalDialConfig did not. So on a
machine without infer init, which seeds browser_use's fallback token, every
infer daemon client command (workspaces, teleport, run, stop) was refused
with ErrNoBinding while the daemon was up.

LocalDialConfig now fills the local token first, so every local client
agrees with the daemon, as docs/daemon.md describes. ErrNoBinding is left
for a binding that is off.
@edenreich
edenreich requested a review from a team as a code owner November 1, 2026 22:25
@github-project-automation github-project-automation Bot moved this to Todo in 2026 Nov 1, 2026
@edenreich
edenreich merged commit 226257b into main Nov 1, 2026
1 check passed
@edenreich
edenreich deleted the fix/daemon-client-local-token branch November 1, 2026 22:59
@inference-gateway-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.240.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@inference-gateway-releaser inference-gateway-releaser Bot added the released Shipped in a release label Nov 1, 2026
@edenreich edenreich moved this from Todo to Done in 2026 Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Shipped in a release

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant