{"record":{"id":"c7331762c49f2c00","repo":"chenhg5/cc-connect","slug":"acp-start-s-w","errorCode":null,"errorMessage":"acp: start %s: %w","messagePattern":"acp: start (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agent/acp/session.go","lineNumber":119,"sourceCode":"\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 {\n\t\t\tmsg := stderrBuf.String()\n\t\t\tif msg != \"\" {\n\t\t\t\tslog.Error(\"acp: process exited\", \"error\", waitErr, \"stderr\", msg)\n\t\t\t\ts.emit(core.Event{Type: core.EventError, Error: fmt.Errorf(\"%s\", strings.TrimSpace(msg))})\n\t\t\t} else {\n\t\t\t\tslog.Debug(\"acp: process exited\", \"error\", waitErr)\n\t\t\t}\n\t\t}\n\t\ts.alive.Store(false)\n\t}()","sourceCodeStart":101,"sourceCodeEnd":137,"githubUrl":"https://github.com/chenhg5/cc-connect/blob/4000b2338aa6e850c99df54f8b0ed6ed7460b401/agent/acp/session.go#L101-L137","documentation":"Raised in newACPSession when cmd.Start() fails to launch the configured agent command. The %s names the binary that could not be executed. It fires when the binary path is wrong, lacks execute permission, or the OS refuses to spawn it — distinct from a CLI-not-found config error, which is checked earlier at agent creation.","triggerScenarios":"Thrown at agent/acp/session.go:119 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the configured command path exists and is executable","Check for architecture or permission problems on the binary","If using run_as_user, confirm the target user may execute the command"],"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-14T05:17:10.506Z"}