{"record":{"id":"7e6f927f0ddda1fa","repo":"chenhg5/cc-connect","slug":"w-stderr-s","errorCode":null,"errorMessage":"%w (stderr: %s)","messagePattern":"%w \\(stderr: (.+?)\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agent/acp/list_sessions.go","lineNumber":209,"sourceCode":"\tabsWorkDir, err := filepath.Abs(workDir)\n\tif err != nil {\n\t\tabsWorkDir = workDir\n\t}\n\n\tprobeCtx, cancel := context.WithTimeout(ctx, listSessionsProbeTimeout)\n\tdefer cancel()\n\n\tstarted := time.Now()\n\ttr, stderrBuf, teardown, err := a.probeSpawn(probeCtx, absWorkDir)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer teardown()\n\n\tinit, err := probeInitialize(probeCtx, tr)\n\tif err != nil {\n\t\tif msg := strings.TrimSpace(stderrBuf.String()); msg != \"\" {\n\t\t\treturn nil, fmt.Errorf(\"%w (stderr: %s)\", err, truncateForLog(msg, 200))\n\t\t}\n\t\treturn nil, err\n\t}\n\tif len(init.AgentCapabilities.SessionCapabilities.List) == 0 {\n\t\tslog.Info(\"acp: session/list unsupported by agent, caching for fast-path\", \"command\", a.cmd)\n\t\ta.listUnsupported.Store(true)\n\t\treturn nil, nil\n\t}\n\n\tentries, err := probeListSessions(probeCtx, tr, absWorkDir)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif entries == nil {\n\t\ta.listUnsupported.Store(true)\n\t\treturn nil, nil\n\t}\n\tout := convertSessionList(entries, absWorkDir)","sourceCodeStart":191,"sourceCodeEnd":227,"githubUrl":"https://github.com/chenhg5/cc-connect/blob/4000b2338aa6e850c99df54f8b0ed6ed7460b401/agent/acp/list_sessions.go#L191-L227","documentation":"A wrapping step in ListSessions: when the ACP probe handshake (initialize) fails and the agent's captured stderr buffer is non-empty, this re-raises the underlying probe error annotated with up to 200 chars of the agent's stderr output to aid diagnosis. It fires only when both a probe failure and stderr output exist.","triggerScenarios":"Thrown at agent/acp/list_sessions.go:209 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the appended stderr text — it is the agent process's own complaint (bad flags, missing auth, crash reason)","Fix the root cause reported in stderr, e.g. install/login/configure the agent CLI","If stderr is truncated, run the agent manually with the same arguments to see full output"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}