dagger/dagger · error
send uncommitted patch chunk: %w
Error message
send uncommitted patch chunk: %w
What it means
Thrown by PackUncommitted when srv.Send of a PackUncommittedResponse_Chunk fails while streaming the binary patch from disk to the client. The metadata was already delivered, so this mid-stream failure indicates the transport broke partway through transferring the patch.
Source
Thrown at engine/session/git/git_uncommitted.go:214
},
},
}); err != nil {
return fmt.Errorf("send uncommitted metadata: %w", err)
}
patch, err = os.Open(patchPath)
if err != nil {
return fmt.Errorf("open uncommitted patch: %w", err)
}
defer patch.Close()
buf := make([]byte, packCheckoutChunkSize)
for {
n, readErr := patch.Read(buf)
if n > 0 {
if err := srv.Send(&PackUncommittedResponse{
Msg: &PackUncommittedResponse_Chunk{Chunk: buf[:n]},
}); err != nil {
return fmt.Errorf("send uncommitted patch chunk: %w", err)
}
}
if readErr != nil {
if !errors.Is(readErr, io.EOF) {
return fmt.Errorf("read uncommitted patch: %w", readErr)
}
break
}
}
return nil
}
type limitedGitPackWriter struct {
w io.Writer
remaining int64
}
func (w *limitedGitPackWriter) Write(p []byte) (int, error) {View on GitHub (pinned to 82ba2681db)
Solutions
- Retry the sync on a stable connection
- Commit or stash large working-tree changes to shrink the patch
- Check for intermediary proxies with short idle/stream timeouts
- Verify client-side gRPC max message sizes if chunks are large (packCheckoutChunkSize)
Defensive patterns
Strategy: retry
Validate before calling
// ensure the stream can carry the patch: check link and idle timeout config // client side: increase receive window / max message size if configured // e.g. grpc.MaxRecvMsgSize(maxGitPackBytes + overhead)
Try / catch
if err != nil && strings.Contains(err.Error(), "send uncommitted patch chunk") {
// transient transport failure: reconnect and retry the whole pack
return retryWithBackoff(3, func() error { return packUncommitted(...) })
} Prevention
- Sync on stable networks; avoid suspending the client mid-transfer
- Keep uncommitted deltas small (commit/stash often) so streams finish quickly
- Configure proxies and LBs with timeouts longer than gitPackTimeout
When it happens
Trigger: gRPC send fails during chunk streaming: client cancelled the context, connection reset, message-size/stream limits hit, or the send exceeded the remaining gitPackTimeout deadline.
Common situations: Very large uncommitted patches over slow links, laptop clients going to sleep mid-transfer, proxies/load-balancers killing idle-looking streams, client crash during sync.
Related errors
- failed to receive message: %w
- send uncommitted metadata: %w
- failed to open pack stream: %w
- failed to receive uncommitted pack: %w
- failed to send file chunk: %w
AI-assisted analysis of dagger/dagger@82ba2681db (2026-09-05).
Data as JSON: /api/errors/dd01f108a1d1eafe.
Report an issue: GitHub.