chenhg5/cc-connect · error
iflow API request failed
Error message
iflow API request failed
What it means
summarizeIFlowError's fallback: returned when no parseable error line was found in the CLI output and the process wait produced no error either — the iflow process failed its API request without explaining why. It is a last-resort generic error.
Source
Thrown at agent/iflow/session.go:872
if line == "" {
continue
}
if strings.HasPrefix(line, "<Execution Info>") || strings.HasPrefix(line, "</Execution Info>") {
continue
}
if strings.HasPrefix(line, "{") || strings.HasPrefix(line, "}") || strings.HasPrefix(line, "\"") {
continue
}
if utf8.RuneCountInString(line) > 300 {
line = string([]rune(line)[:300]) + "..."
}
return fmt.Errorf("%s", line)
}
}
if waitErr != nil {
return fmt.Errorf("iflow process failed: %w", waitErr)
}
return fmt.Errorf("iflow API request failed")
}
func (s *iflowSession) RespondPermission(_ string, _ core.PermissionResult) error {
return nil
}
func (s *iflowSession) Events() <-chan core.Event {
return s.events
}
func (s *iflowSession) CurrentSessionID() string {
v, _ := s.sessionID.Load().(string)
return v
}
func (s *iflowSession) Alive() bool {
return s.alive.Load()
}View on GitHub (pinned to 4000b2338a)
Solutions
- Enable debug/verbose logging of the iflow CLI output to capture the raw JSON error
- Check iflow service status / network connectivity
- Upgrade or patch the summarizer to also inspect JSON error lines if the CLI changed format
- Retry the turn; transient upstream API failures often resolve
Defensive patterns
Strategy: retry
Try / catch
if err := session.Send(ctx, msg, nil); err != nil {
if err.Error() == "iflow API request failed" {
if attempt < maxAttempts { time.Sleep(backoff); retry() }
else { notifyUserUpstreamOutage() }
}
} Prevention
- Implement bounded retries with backoff for this opaque failure
- Log raw CLI output at debug level to compensate for the generic message
- Alert on iflow service status to distinguish outage from local misconfig
When it happens
Trigger: readLoop calls summarizeIFlowError and the iflow CLI produced no parsable text and exited without a wait error, e.g. it printed only JSON error objects that the summarizer skips.
Common situations: Upstream iflow API outage returning JSON error bodies; CLI output format changed so the summarizer's heuristics no longer match; empty output with non-zero logical failure.
Related errors
- %s
- iflow process failed: %w
- claudeSession: start: %w
- usage endpoint returned status %d: %s
- copilot: %q CLI not found in PATH, please install it first
AI-assisted analysis of chenhg5/cc-connect@4000b2338a (2026-09-06).
Data as JSON: /api/errors/d5a86affc3b7a0d6.
Report an issue: GitHub.