chenhg5/cc-connect · error
antigravity: read chats dir: %w
Error message
antigravity: read chats dir: %w
What it means
Wraps a failed os.ReadDir of the antigravity project's chats directory (~/.gemini/tmp/<slug>/chats) during session listing. Not-exist is handled as 'no sessions'; this error only fires on other IO failures such as permission denial or a path occupied by a non-directory.
Source
Thrown at agent/antigravity/antigravity.go:474
LastUpdated time.Time `json:"lastUpdated"`
} `json:"$set"`
}
func listAntigravitySessions(workDir string) ([]core.AgentSessionInfo, error) {
homeDir, err := os.UserHomeDir()
if err != nil {
return nil, fmt.Errorf("antigravity: cannot determine home dir: %w", err)
}
slug := antigravityProjectSlug(workDir)
chatsDir := filepath.Join(homeDir, ".gemini", "tmp", slug, "chats")
entries, err := os.ReadDir(chatsDir)
if err != nil {
if os.IsNotExist(err) {
return nil, nil
}
return nil, fmt.Errorf("antigravity: read chats dir: %w", err)
}
var sessions []core.AgentSessionInfo
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
}
var sf sessionFile
var summary string
msgCount := 0
hasUserMsg := falseView on GitHub (pinned to 4000b2338a)
Solutions
- Check permissions on the ~/.gemini/tmp/<slug>/chats path
- Confirm nothing (a file or symlink) occupies the directory path
- Retry after fixing filesystem access
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at agent/antigravity/antigravity.go:474 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/25a9a00b1cbe0df5.
Report an issue: GitHub.