{"record":{"id":"5b3a5ba6485b16a1","repo":"chenhg5/cc-connect","slug":"tmux-permission-requests-are-not-supported","errorCode":null,"errorMessage":"tmux: permission requests are not supported","messagePattern":"tmux: permission requests are not supported","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"agent/tmux/session.go","lineNumber":179,"sourceCode":"\t\t\t\t\tresponse := s.extractResponse()\n\t\t\t\t\ts.safeSend(core.Event{Type: core.EventResult, Content: response, Done: true})\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc (s *tmuxSession) safeSend(ev core.Event) {\n\tdefer func() { _ = recover() }() // channel may be closed on session teardown\n\tselect {\n\tcase s.events <- ev:\n\tcase <-s.ctx.Done():\n\t}\n}\n\nfunc (s *tmuxSession) RespondPermission(_ string, _ core.PermissionResult) error {\n\treturn fmt.Errorf(\"tmux: permission requests are not supported\")\n}\n\nfunc (s *tmuxSession) Events() <-chan core.Event { return s.events }\n\nfunc (s *tmuxSession) CurrentSessionID() string { return s.sessionID }\n\nfunc (s *tmuxSession) Alive() bool { return s.alive.Load() }\n\nfunc (s *tmuxSession) Close() error {\n\ts.closeOnce.Do(func() {\n\t\ts.alive.Store(false)\n\t\ts.mu.Lock()\n\t\tif s.pollCancel != nil {\n\t\t\ts.pollCancel()\n\t\t\ts.pollCancel = nil\n\t\t}\n\t\ts.mu.Unlock()\n\t\ts.cancel()","sourceCodeStart":161,"sourceCodeEnd":197,"githubUrl":"https://github.com/chenhg5/cc-connect/blob/4000b2338aa6e850c99df54f8b0ed6ed7460b401/agent/tmux/session.go#L161-L197","documentation":"The tmux agent drives a terminal via send-keys and parses pane output, so it has no mechanism to receive or answer permission prompts. RespondPermission therefore always returns 'tmux: permission requests are not supported'. The core engine calls this when the user clicks a permission button on a message routed to a tmux-backed session.","triggerScenarios":"Calling RespondPermission (directly or via the engine's permission-card buttons) on any tmuxSession, regardless of arguments.","commonSituations":"Platform shows generic permission UI because the session emitted a permission-like event path in the engine; user taps Allow/Deny on an old card after the session was switched to a tmux agent; misconfiguration mixing tmux with an agent that normally requests permissions (e.g. Claude Code).","solutions":["Don't send permission prompts to tmux-backed sessions — respond by typing the approval choice into the terminal via Send instead","Check engine routing: the permission card should only be offered for sessions whose AgentSession supports permission responses","If you need interactive permissions, use an agent adapter with RespondPermission support (e.g. claudecode) instead of the tmux passthrough"],"exampleFix":"// engine side: capability check before showing permission UI\nif pp, ok := sess.(core.PermissionResponder); ok {\n    showPermissionCard(chatID, pp)\n} else {\n    p.Reply(chatID, i18n.T(core.MsgPermissionNotSupported))\n}","handlingStrategy":"fallback","validationCode":null,"typeGuard":"func supportsPermissions(sess core.AgentSession) bool {\n    _, ok := sess.(interface {\n        RespondPermission(string, core.PermissionResult) error\n    })\n    return ok // always true; instead gate on agent kind/capability flag\n}\n// better: gate on an agent capability flag, since tmux implements but rejects it","tryCatchPattern":"// Go\nif err := sess.RespondPermission(reqID, result); err != nil {\n    if strings.Contains(err.Error(), \"not supported\") {\n        p.Reply(chatID, \"This agent cannot process permission prompts; type your choice in the terminal.\")\n    }\n}","preventionTips":["Only render permission buttons for agents that advertise permission support","For tmux-backed agents, translate approvals into typed responses via Send","Document in the agent list which adapters support interactive permissions"],"tags":["permissions","unsupported-operation","tmux"],"backgroundTag":"unsupported-operation","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"}