chenhg5/cc-connect · error
session file not found: %s
Error message
session file not found: %s
What it means
A sentinel error from antigravity DeleteSession: no chat directory matching the requested session ID was found under the project's chats storage. It fires when the session was already deleted, the ID is wrong, or the storage layout differs from expectations.
Source
Thrown at agent/antigravity/antigravity.go:238
}
a.mu.Unlock()
return newAntigravitySession(ctx, cmd, extraArgs, workDir, model, mode, sessionID, extraEnv, timeout)
}
func (a *Agent) ListSessions(_ context.Context) ([]core.AgentSessionInfo, error) {
return listAntigravitySessions(a.workDir)
}
func (a *Agent) DeleteSession(_ context.Context, sessionID string) error {
homeDir, err := os.UserHomeDir()
if err != nil {
return fmt.Errorf("antigravity: cannot determine home dir: %w", err)
}
chatsDir := filepath.Join(homeDir, ".gemini", "tmp", antigravityProjectSlug(a.workDir), "chats")
entries, err := os.ReadDir(chatsDir)
if err != nil {
return fmt.Errorf("session file not found: %s", sessionID)
}
for _, entry := range entries {
if entry.IsDir() || !strings.HasSuffix(entry.Name(), ".jsonl") {
continue
}
fpath := filepath.Join(chatsDir, entry.Name())
file, err := os.Open(fpath)
if err != nil {
continue
}
scanner := bufio.NewScanner(file)
scanner.Buffer(make([]byte, 0, 64*1024), 4*1024*1024)
if scanner.Scan() {
var sf struct {
SessionID string `json:"sessionId"`
}
if json.Unmarshal([]byte(scanner.Text()), &sf) == nil && sf.SessionID == sessionID {View on GitHub (pinned to 4000b2338a)
Solutions
- Run /sessions to list the current valid session IDs
- Refresh the list — the session may have been deleted in another window
- Verify the working directory matches the project the session belongs to
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at agent/antigravity/antigravity.go:238 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/298349ea0c6cf0b8.
Report an issue: GitHub.