chenhg5/cc-connect · warning
antigravity: permission responses are only available in defa
Error message
antigravity: permission responses are only available in default mode
What it means
RespondPermission returns this error when the session was created without a permission bridge — i.e. not in default (interactive permission) mode. In 'yolo' (permissions skipped) or 'plan' (sandbox) modes there is no TCP bridge wired up, so permission decisions have nothing to be relayed to.
Source
Thrown at agent/antigravity/session.go:393
}
if len(candidates) == 0 {
return ""
}
sort.Slice(candidates, func(i, j int) bool {
if candidates[i].diff == candidates[j].diff {
return candidates[i].modTime.After(candidates[j].modTime)
}
return candidates[i].diff < candidates[j].diff
})
return candidates[0].sessionID
}
func (as *antigravitySession) RespondPermission(requestID string, result core.PermissionResult) error {
if !as.alive.Load() {
return fmt.Errorf("session is closed")
}
if as.permissionBridge == nil {
return fmt.Errorf("antigravity: permission responses are only available in default mode")
}
return as.permissionBridge.RespondPermission(requestID, result)
}
func (as *antigravitySession) Events() <-chan core.Event {
return as.events
}
func (as *antigravitySession) CurrentSessionID() string {
v, _ := as.chatID.Load().(string)
return v
}
func (as *antigravitySession) Alive() bool {
return as.alive.Load()
}
func (as *antigravitySession) Close() error {View on GitHub (pinned to 4000b2338a)
Solutions
- Switch the agent mode to default in config.toml so the permission bridge is created
- Suppress/hide permission-request UI for yolo/plan mode sessions before calling RespondPermission
- Gate the call: only invoke RespondPermission if the session advertises permission support
Example fix
// before
return as.RespondPermission(requestID, result)
// after
if agentMode == "yolo" || agentMode == "plan" {
return errors.New("permissions not available in this mode")
}
return as.RespondPermission(requestID, result) Defensive patterns
Strategy: validation
Validate before calling
func permissionsSupported(mode string) bool { return mode == "" || mode == "default" }
if !permissionsSupported(cfg.Mode) { hidePermissionUI() } Try / catch
if err := s.RespondPermission(id, res); err != nil && strings.Contains(err.Error(), "only available in default mode") {
log.Warn("auto-denying: mode has no permission bridge")
} Prevention
- Only render permission UI for default-mode antigravity sessions
- Document that yolo/plan modes cannot answer permission requests
- Centralize mode checks where permission events are handled
When it happens
Trigger: Calling RespondPermission on a session whose permissionBridge field is nil, which happens when the agent was configured with mode="yolo" or mode="plan" instead of default mode.
Common situations: Config sets mode="yolo" to skip prompts, but platform UI still renders permission buttons that call RespondPermission; code assumes all antigravity sessions support interactive permissions.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- permission bridge environment is missing
- codex: mkdir codex home: %w
- codex: write config.toml: %w
- tmux: permission requests are not supported
- create temp config: %w
AI-assisted analysis of chenhg5/cc-connect@4000b2338a (2026-09-06).
Data as JSON: /api/errors/ba1bd6938c0d9e79.
Report an issue: GitHub.