-
Notifications
You must be signed in to change notification settings - Fork 250
Closed
Labels
automatedIssues created by cagentIssues created by cagentkind/bugSomething isn't workingSomething isn't working
Description
🟠 high - bug
File: cmd/root/api.go (line 104)
Code
rt, err := runtime.New(t,
runtime.WithCurrentAgent(agentName),
)
if err != nil {
return nil, ToolOutput{}, fmt.Errorf("failed to create runtime: %w", err)
}Problem
Similar to the issue in run.go, the API server creates a new runtime.Runtime without properly closing it. This can lead to database connection leaks when the runtime internally creates a SQLiteSessionStore.
Suggested Fix
Implement proper resource cleanup by adding a Close() method to runtime.Runtime and deferring its call, ensuring that any internal SessionStore is properly closed after use.
Found by nightly codebase scan
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
automatedIssues created by cagentIssues created by cagentkind/bugSomething isn't workingSomething isn't working