{"record":{"id":"ad3282bab51c2b23","repo":"chenhg5/cc-connect","slug":"job-timed-out-after-v","errorCode":null,"errorMessage":"job timed out after %v","messagePattern":"job timed out after (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"core/cron.go","lineNumber":711,"sourceCode":"\t\tslog.Error(\"cron: project not found\", \"job\", job.ID, \"project\", job.Project, \"manual\", manual)\n\t\tcs.store.MarkRun(job.ID, fmt.Errorf(\"project %q not found\", job.Project))\n\t\treturn\n\t}\n\n\tslog.Info(\"cron: executing job\", \"id\", job.ID, \"project\", job.Project, \"manual\", manual, \"prompt\", truncateStr(job.Prompt, 60))\n\n\tdone := make(chan error, 1)\n\tgo func() {\n\t\tdone <- engine.ExecuteCronJob(job)\n\t}()\n\n\tvar err error\n\ttimeout := job.ExecutionTimeout()\n\tif timeout > 0 {\n\t\tselect {\n\t\tcase err = <-done:\n\t\tcase <-time.After(timeout):\n\t\t\terr = fmt.Errorf(\"job timed out after %v\", timeout)\n\t\t}\n\t} else {\n\t\terr = <-done\n\t}\n\n\tcs.store.MarkRun(job.ID, err)\n\n\tif err != nil {\n\t\tslog.Error(\"cron: job failed\", \"id\", job.ID, \"manual\", manual, \"error\", err)\n\t} else {\n\t\tslog.Info(\"cron: job completed\", \"id\", job.ID, \"manual\", manual)\n\t}\n}\n\n// mutePlatform wraps a Platform and discards all outgoing messages.\n// Used for muted cron jobs that should execute without sending chat messages.\ntype mutePlatform struct {\n\tPlatform","sourceCodeStart":693,"sourceCodeEnd":729,"githubUrl":"https://github.com/chenhg5/cc-connect/blob/4000b2338aa6e850c99df54f8b0ed6ed7460b401/core/cron.go#L693-L729","documentation":"runJob enforces the job's execution timeout: if the agent engine does not deliver a result on the done channel within job.ExecutionTimeout(), the run is failed with 'job timed out after %v' and recorded via MarkRun. This indicates the underlying agent run exceeded its allowed duration.","triggerScenarios":"Agent process hangs or takes longer than the job's configured execution timeout during a scheduled or manual (RunJobNow) run.","commonSituations":"Large prompts against slow models, agent CLI stuck waiting for input, network stalls — all exceeding the per-job timeout configured on the cron job.","solutions":["Increase the job's execution timeout setting","Shorten/simplify the job prompt or move heavy work to smaller steps","Investigate the agent CLI for hangs (check its logs); network or auth stalls are common causes"],"exampleFix":"// before\nexecution_timeout_secs = 60 // too short for long agent runs\n// after\nexecution_timeout_secs = 900","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// timeout is recorded via store.MarkRun; inspect it after the fact\nif rec := cs.Store().Get(job.ID); rec != nil && rec.LastError != nil && strings.Contains(rec.LastError.Error(), \"timed out\") {\n    slog.Warn(\"cron job timed out\", \"id\", job.ID)\n}","preventionTips":["Set execution timeouts generously relative to typical agent run duration","Keep prompts small enough to finish within the timeout","Monitor MarkRun failures to catch chronic timeouts"],"tags":["go","cron","timeout","agent"],"backgroundTag":"request-timeout","analyzedSha":"4000b2338aa6e850c99df54f8b0ed6ed7460b401","analyzedAt":"2026-09-06T11:45:09.575Z","contentChangedAt":"2026-09-06T11:45:09.575Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}