dagger/dagger · error
host service proxy client %q not found for client %q
Error message
host service proxy client %q not found for client %q
What it means
getHostServiceCaller walks the client's parent chain looking for a parent whose clientID equals the client's hostServiceProxyClientID, to route host-service calls through the proxy client. If no such parent exists in the chain, this error is returned.
Source
Thrown at engine/server/session.go:1077
ctx context.Context,
id string,
) (engineutil.SessionCaller, error) {
if id == client.clientID && client.hostServiceProxyClientID != "" {
// Synthetic nested clients (e.g. builtin dang evaluation) do not
// establish their own session attachables. When host-backed services
// such as git config are requested through the current client ID, fall
// back to the explicit proxy client chain.
if caller, ok := client.daggerSession.attachables.Lookup(id); ok {
return caller, nil
}
for i := len(client.parents) - 1; i >= 0; i-- {
parent := client.parents[i]
if parent.clientID == client.hostServiceProxyClientID {
return parent.getHostServiceCaller(ctx, parent.clientID)
}
}
return nil, fmt.Errorf("host service proxy client %q not found for client %q", client.hostServiceProxyClientID, client.clientID)
}
return client.getClientCaller(ctx, id)
}
func (srv *Server) clientFromContext(ctx context.Context) (*daggerClient, error) {
clientMetadata, err := engine.ClientMetadataFromContext(ctx)
if err != nil {
return nil, fmt.Errorf("failed to get client metadata for session call: %w", err)
}
client, err := srv.clientFromIDs(clientMetadata.SessionID, clientMetadata.ClientID)
if err != nil {
return nil, err
}
return client, nil
}
func (srv *Server) clientFromIDs(sessID, clientID string) (*daggerClient, error) {View on GitHub (pinned to 82ba2681db)
Solutions
- Re-run the pipeline so a fresh parent chain including the host-service proxy client is established
- Ensure parent sessions stay alive for the duration of child host-service calls
- Check for early cancellation of the parent session in your workflow
- If reproducible in a supported setup, report as an engine bug with session/parent IDs from the message
Defensive patterns
Strategy: retry
Validate before calling
// Go: ensure parent sessions outlive child operations // structure code so parent queries aren't cancelled before children finish errGroup, ctx := errgroup.WithContext(baseCtx) // propagate cancellation carefully
Try / catch
// Go
if err != nil && strings.Contains(err.Error(), "host service proxy client") {
// re-establish the session and retry the operation
} Prevention
- Keep parent sessions alive for the duration of nested calls
- Avoid cancelling parent contexts while children use host services
- Let the SDK manage client chains rather than building custom ones
When it happens
Trigger: A client performs a host-service call, client.hostServiceProxyClientID is set, but no parent in client.parents has that clientID — the proxy parent disconnected, was never registered, or the chain was pruned.
Common situations: Nested function calls where an intermediate parent session exited/cancelled before the child made a host call, custom SDK harnesses that build client chains incorrectly, or race between parent teardown and child host-service usage.
Related errors
- failed to get engine client: %w
- buildkit: %w
- failed to get engine client: %w
- module source engine client: %w
- buildkit: %w
AI-assisted analysis of dagger/dagger@82ba2681db (2026-09-05).
Data as JSON: /api/errors/9702aab0dd585d0e.
Report an issue: GitHub.