-
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/run.go (line 308)
Code
rt, err := runtime.New(t,
runtime.WithCurrentAgent(agentName),
)
if err != nil {
return nil, ToolOutput{}, fmt.Errorf("failed to create runtime: %w", err)
}Problem
The runtime.New function can potentially create a SQLiteSessionStore internally. Since there is no explicit Close() call on the rt object or the underlying session store, database connections will accumulate and leak, leading to resource exhaustion and potential system instability.
Suggested Fix
Add a Close() method to the runtime.Runtime interface and defer its call after creating the runtime, or explicitly create and close the SessionStore. The Close() method should be responsible for closing the internal SessionStore.
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