{"record":{"id":"f67ea4536db46d19","repo":"chenhg5/cc-connect","slug":"acp-transport-not-available","errorCode":null,"errorMessage":"acp: transport not available","messagePattern":"acp: transport not available","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agent/acp/session.go","lineNumber":715,"sourceCode":"func (s *acpSession) Events() <-chan core.Event {\n\treturn s.events\n}\n\nfunc (s *acpSession) CurrentSessionID() string {\n\treturn s.currentACPSessionID()\n}\n\n// CancelTurn sends an ACP session/cancel notification to abort the current\n// turn while keeping the session alive. The agent should cancel the active\n// LLM request and persist state, then wait for the next user message on the\n// same connection. This is used by /stop instead of Close().\nfunc (s *acpSession) CancelTurn() error {\n\tsid := s.currentACPSessionID()\n\tif sid == \"\" {\n\t\treturn fmt.Errorf(\"acp: no active session to cancel\")\n\t}\n\tif s.tr == nil {\n\t\treturn fmt.Errorf(\"acp: transport not available\")\n\t}\n\tslog.Debug(\"acp: cancelling current turn\", \"session_id\", sid)\n\treturn s.tr.sendNotification(\"session/cancel\", map[string]any{\n\t\t\"sessionId\": sid,\n\t})\n}\n\nfunc (s *acpSession) Alive() bool {\n\treturn s.alive.Load()\n}\n\nfunc (s *acpSession) Close() error {\n\ts.alive.Store(false)\n\ts.cancel()\n\tif s.cmd != nil && s.cmd.Process != nil {\n\t\t_ = s.cmd.Process.Kill()\n\t}\n\tdone := make(chan struct{})","sourceCodeStart":697,"sourceCodeEnd":733,"githubUrl":"https://github.com/chenhg5/cc-connect/blob/4000b2338aa6e850c99df54f8b0ed6ed7460b401/agent/acp/session.go#L697-L733","documentation":"A sentinel guard in acpSession.CancelTurn: the session holds no live RPC transport (nil or closed). It fires when /stop is used after the session was closed or the transport never came up, making it impossible to deliver a session/cancel notification.","triggerScenarios":"Thrown at agent/acp/session.go:715 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Start a new session — the current one has no live agent connection","Check earlier errors for why the transport died","Treat /stop on a dead session as a no-op"],"exampleFix":null,"handlingStrategy":"validation","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"}