{"record":{"id":"a8e63edd8212ad63","repo":"chenhg5/cc-connect","slug":"compress-timed-out","errorCode":null,"errorMessage":"compress timed out","messagePattern":"compress timed out","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"core/engine.go","lineNumber":10554,"sourceCode":"\t\tcase event, ok = <-events:\n\t\t\tif !ok {\n\t\t\t\te.cleanupInteractiveState(sessionKey, state)\n\t\t\t\tif !auto {\n\t\t\t\t\tif len(textParts) > 0 {\n\t\t\t\t\t\te.send(p, replyCtx, strings.Join(textParts, \"\"))\n\t\t\t\t\t} else {\n\t\t\t\t\t\te.reply(p, replyCtx, e.i18n.T(MsgCompressDone))\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\te.notifyDroppedQueuedMessages(state, fmt.Errorf(\"agent process exited during compress\"))\n\t\t\t\treturn\n\t\t\t}\n\t\tcase <-idleCh:\n\t\t\tif !auto {\n\t\t\t\te.send(p, replyCtx, fmt.Sprintf(e.i18n.T(MsgError), \"compress timed out\"))\n\t\t\t}\n\t\t\te.cleanupInteractiveState(sessionKey, state)\n\t\t\te.notifyDroppedQueuedMessages(state, fmt.Errorf(\"compress timed out\"))\n\t\t\treturn\n\t\tcase <-e.ctx.Done():\n\t\t\treturn\n\t\t}\n\n\t\tif state.isStopped() {\n\t\t\treturn\n\t\t}\n\n\t\tif idleTimer != nil {\n\t\t\tif !idleTimer.Stop() {\n\t\t\t\tselect {\n\t\t\t\tcase <-idleTimer.C:\n\t\t\t\tdefault:\n\t\t\t\t}\n\t\t\t}\n\t\t\tidleTimer.Reset(e.eventIdleTimeout)\n\t\t}","sourceCodeStart":10536,"sourceCodeEnd":10572,"githubUrl":"https://github.com/chenhg5/cc-connect/blob/4000b2338aa6e850c99df54f8b0ed6ed7460b401/core/engine.go#L10536-L10572","documentation":"A manual (non-auto) /compress that does not reach idle within the compress timeout gives the user a localized \"compress timed out\" error; the engine cleans up interactive state and notifies queued messages they were dropped with this reason. Auto compresses stay silent on timeout.","triggerScenarios":"The `<-idleCh` case fires (no agent events for the idle window) while the compress is still in progress and auto=false: the compression prompt takes longer than the configured idle/timeout window, so the engine gives up.","commonSituations":"Very large conversation context making compression slow; slow model/provider endpoint; agent busy with other work so the idle heuristic fires early.","solutions":["Retry /compress when the agent is idle; heavy load stretches completion past the timeout","Increase the compress/idle timeout in config if your context sizes routinely need longer","Use a faster provider/model for compression, or reduce history with /new before compressing","Queued messages were dropped — re-send them after the compress completes or start a fresh session"],"exampleFix":"// before: default idle timeout too short for huge contexts\n[engine]\ncompress_idle_timeout = \"60s\"\n\n// after: allow slow compressions to finish\n[engine]\ncompress_idle_timeout = \"300s\"","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err indicates \"compress timed out\": wait until the agent is idle, then retry /compress with a larger configured timeout; warn users their queued messages were dropped.","preventionTips":["Configure compress_idle_timeout generously relative to your typical context size","Compress while the agent is idle, not while other tasks are running","Prefer /new (fresh session) over compressing very large histories","Re-send queued messages after a timeout since they are dropped by design"],"tags":["go","compress","timeout","session-lifecycle"],"backgroundTag":"request-timeout","analyzedSha":"4000b2338aa6e850c99df54f8b0ed6ed7460b401","analyzedAt":"2026-09-06T11:45:09.575Z","contentChangedAt":"2026-09-06T11:45:09.575Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}