chenhg5/cc-connect · error
agent error (no details)
Error message
agent error (no details)
What it means
During relay event streaming, the agent emitted an EventError whose event.Error field was nil, so cc-connect returns a generic 'agent error (no details)' sentinel. The agent signalled failure without attaching an error object, leaving no cause to propagate. This is a defensive branch so callers always get a non-nil error.
Source
Thrown at core/engine.go:16072
if currentID := agentSession.CurrentSessionID(); currentID != "" {
saveRelaySessionID(currentID, true)
}
resp := event.Content
if resp == "" && len(textParts) > 0 {
resp = strings.Join(textParts, "")
}
if resp == "" {
resp = "(empty response)"
}
slog.Info("relay: turn complete", "from", fromProject, "to", e.name, "response_len", len(resp))
agentSession.Close()
return resp, nil
case EventError:
agentSession.Close()
if event.Error != nil {
return "", event.Error
}
return "", fmt.Errorf("agent error (no details)")
case EventPermissionRequest:
// Auto-approve all permissions in relay mode
_ = agentSession.RespondPermission(event.RequestID, PermissionResult{
Behavior: "allow",
UpdatedInput: event.ToolInputRaw,
})
}
if ctx.Err() != nil {
// Relay timed out. Let the agent finish its turn in the
// background so the session state is saved cleanly and the
// session remains resumable for the next relay call.
go e.drainRelaySession(agentSession, session, sessions, agent.Name(), relaySessionKey)
return relayPartialResponseOrError(ctx.Err(), textParts, fromProject, e.name)
}
}
// Event channel closed without EventResult.
agentSession.Close()View on GitHub (pinned to 4000b2338a)
Solutions
- Check agent process stderr/logs around the failure timestamp for the real cause
- Retry — intermittent agent crashes often include proper error detail on retry
- Update or fix the agent adapter so it always populates EventError.Error
- Check agent CLI version for known crash bugs and upgrade
Example fix
// before (adapter emitting the event)
events <- Event{Type: EventError}
// after
events <- Event{Type: EventError, Error: fmt.Errorf("agent exited: %s", stderrTail)} Defensive patterns
Strategy: try-catch
Try / catch
case EventError:
agentSession.Close()
if event.Error != nil {
return "", event.Error
}
slog.Error("agent error without detail; check agent stderr")
return "", fmt.Errorf("agent error (no details)") Prevention
- Use first-party or well-tested agent adapters that always populate EventError.Error
- Capture and log agent stderr so failures are attributable even when Error is nil
- Keep agent CLIs updated to avoid unparseable crash output
- Retry once on detail-less agent errors before surfacing to the user
When it happens
Trigger: The relay event loop receives event.Type == EventError with event.Error == nil — an agent adapter emitted a failure event without populating Error (adapter bug, or the agent CLI produced an unparseable failure output that was normalized to an empty error).
Common situations: Agent CLI crashed with output the adapter couldn't parse into a structured error; custom/third-party agent adapter with incomplete EventError handling; agent stderr lost due to pipe buffering so no detail was captured.
Related errors
- session is closed
- %s
- job timed out after %v
- create workspace agent for %s: %w
- invalid source session key: %w
AI-assisted analysis of chenhg5/cc-connect@4000b2338a (2026-09-06).
Data as JSON: /api/errors/2dd67dbd5fba8243.
Report an issue: GitHub.