chenhg5/cc-connect · error
cron job %q produced an empty response
Error message
cron job %q produced an empty response
What it means
Post-run empty-response guard: after processInteractiveMessageWith, the session history length did not increase, so the cron job produced no assistant response (agent exited silently, errored, or the prompt yielded nothing). Surfaced as the cron run's result instead of failing invisibly.
Source
Thrown at core/engine.go:1644
msg.SessionKey = runSessionKey
session := sessions.NewSideSession(runSessionKey, "cron-"+job.ID)
if !session.TryLock() {
return fmt.Errorf("session %q is busy", runSessionKey)
}
iKey := fmt.Sprintf("%s#cron:%s", runSessionKey, session.ID)
if workspaceDir != "" {
iKey = workspaceDir + ":" + iKey
}
prevHistLen := session.HistoryLen()
e.processInteractiveMessageWith(effectivePlatform, msg, session, agent, sessions, iKey, workspaceDir, runSessionKey)
e.cleanupInteractiveState(iKey)
// Empty-response detection via session history delta: processInteractiveMessageWith
// always adds a "user" entry (prevHistLen+1), then an "assistant" entry on success
// (prevHistLen+2). This approach correctly detects empty responses across all
// delivery modes (plain text, cards, rich cards, DingTalk AI streaming) because
// AddHistory("assistant",...) is called before any platform-specific rendering path.
if !job.Mute && session.HistoryLen() < prevHistLen+2 {
return fmt.Errorf("cron job %q produced an empty response", job.ID)
}
return nil
}
session := sessions.GetOrCreateActive(sessionKey)
if !session.TryLock() {
return fmt.Errorf("session %q is busy", sessionKey)
}
iKey := sessionKey
if workspaceDir != "" {
iKey = workspaceDir + ":" + sessionKey
}
prevHistLen := session.HistoryLen()
e.processInteractiveMessageWith(effectivePlatform, msg, session, agent, sessions, iKey, workspaceDir, sessionKey)
// Same empty-response detection as the useNewSession path above.
if !job.Mute && session.HistoryLen() < prevHistLen+2 {
return fmt.Errorf("cron job %q produced an empty response", job.ID)View on GitHub (pinned to 4000b2338a)
Solutions
- Run the prompt manually against the agent CLI in that workspace
- Inspect agent logs; verify the job prompt/template is non-empty and the agent binary works
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at core/engine.go:1644 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of chenhg5/cc-connect@4000b2338a (2026-09-06).
Data as JSON: /api/errors/afb2762e9c2e69fc.
Report an issue: GitHub.