chenhg5/cc-connect · error
cursorSession: stdin pipe: %w
Error message
cursorSession: stdin pipe: %w
What it means
Wraps a failed exec.Cmd.StdinPipe() in cursorSession.Send. The stdin pipe is mandatory for Cursor: it carries interaction_query permission responses, and without it Cursor sees EOF and auto-rejects permissions. Pre-spawn failure indicates fd exhaustion.
Source
Thrown at agent/cursor/session.go:152
cmd := exec.CommandContext(cs.ctx, cs.cmd, args...)
cmd.Dir = cs.workDir
env := os.Environ()
if len(cs.extraEnv) > 0 {
env = core.MergeEnv(env, cs.extraEnv)
}
cmd.Env = env
stdout, err := cmd.StdoutPipe()
if err != nil {
return fmt.Errorf("cursorSession: stdout pipe: %w", err)
}
// Set up a stdin pipe so we can write interaction_query responses back to Cursor.
// Without a connected stdin, Cursor gets EOF and auto-rejects all permission requests.
stdin, err := cmd.StdinPipe()
if err != nil {
return fmt.Errorf("cursorSession: stdin pipe: %w", err)
}
var stderrBuf bytes.Buffer
cmd.Stderr = &stderrBuf
if err := cmd.Start(); err != nil {
_ = stdin.Close()
return fmt.Errorf("cursorSession: start: %w", err)
}
cs.stdinMu.Lock()
cs.stdin = stdin
cs.stdinMu.Unlock()
cs.wg.Add(1)
go cs.readLoop(cmd, stdout, &stderrBuf)
return nilView on GitHub (pinned to 4000b2338a)
Solutions
- Raise the file-descriptor limit
- Reduce concurrent sessions
- Investigate fd leaks in the daemon process
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at agent/cursor/session.go:152 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of chenhg5/cc-connect@4000b2338a (2026-09-06).
Data as JSON: /api/errors/6be6055dc43a2a05.
Report an issue: GitHub.