{"record":{"id":"47cd63039d810ac8","repo":"chenhg5/cc-connect","slug":"acp-stdout-pipe-w","errorCode":null,"errorMessage":"acp: stdout pipe: %w","messagePattern":"acp: stdout pipe: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agent/acp/session.go","lineNumber":109,"sourceCode":"\t\ttoolInputByID: make(map[string]string),\n\t\tacpSessID:     cfg.resumeSessionID,\n\t\tcallbacks:     cfg.callbacks,\n\t}\n\ts.alive.Store(true)\n\n\tcmd := exec.CommandContext(sessionCtx, cfg.command, cfg.args...)\n\tcmd.Dir = absWorkDir\n\tcmd.Env = core.MergeEnv(os.Environ(), cfg.extraEnv)\n\n\tstdin, err := cmd.StdinPipe()\n\tif err != nil {\n\t\tcancel()\n\t\treturn nil, fmt.Errorf(\"acp: stdin pipe: %w\", err)\n\t}\n\tstdout, err := cmd.StdoutPipe()\n\tif err != nil {\n\t\tcancel()\n\t\treturn nil, fmt.Errorf(\"acp: stdout pipe: %w\", err)\n\t}\n\tvar stderrBuf bytes.Buffer\n\tcmd.Stderr = io.MultiWriter(&stderrBuf, os.Stderr)\n\n\ts.cmd = cmd\n\ts.tr = newTransport(stdout, stdin, s.onNotification, s.onServerRequest)\n\n\tif err := cmd.Start(); err != nil {\n\t\tcancel()\n\t\treturn nil, fmt.Errorf(\"acp: start %s: %w\", cfg.command, err)\n\t}\n\n\ts.wg.Add(1)\n\tgo func() {\n\t\tdefer s.wg.Done()\n\t\ts.tr.readLoop(sessionCtx)\n\t\twaitErr := cmd.Wait()\n\t\tif waitErr != nil {","sourceCodeStart":91,"sourceCodeEnd":127,"githubUrl":"https://github.com/chenhg5/cc-connect/blob/4000b2338aa6e850c99df54f8b0ed6ed7460b401/agent/acp/session.go#L91-L127","documentation":"Raised in newACPSession when exec.Cmd.StdoutPipe() fails while wiring pipes to the agent command. Like the stdin variant, it fires before process start and signals OS-level pipe allocation failure (typically fd exhaustion), not an agent problem.","triggerScenarios":"Thrown at agent/acp/session.go:109 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Raise the file-descriptor limit on the host","Lower the count of parallel ACP sessions","Investigate fd leaks in long-running cc-connect daemons"],"exampleFix":null,"handlingStrategy":"try-catch","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-14T00:17:10.932Z"}