Skip to content

Fix cagent acp session persitence#1601

Merged
dgageot merged 1 commit intodocker:mainfrom
krissetto:acp-session-persistence
Feb 5, 2026
Merged

Fix cagent acp session persitence#1601
dgageot merged 1 commit intodocker:mainfrom
krissetto:acp-session-persistence

Conversation

@krissetto
Copy link
Contributor

Persist ACP sessions to the default sqlite db unless specified with --session-db flag

Generally makes ACP agent and session setup follow more the patterns used for the api and run commands

Also fixes tilde expansion on the run command when specifying the session db as --session-db=~/somepath.db or --session-db "~/somepath.db"

Fixes #1591

@krissetto krissetto requested a review from a team as a code owner February 4, 2026 22:49
@Pnkcaht
Copy link
Contributor

Pnkcaht commented Feb 4, 2026

great, thanks @krissetto :)

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Summary

Found 1 resource leak issue in the changed code that should be addressed.

Issues Found

Resource Leak (Medium Severity): The session database connection created in createLocalRuntimeAndSession is not properly closed if subsequent operations fail.

Recommendation

The pattern used in pkg/acp/run.go (with deferred close) should be applied to cmd/root/run.go as well to ensure consistent resource management.

…sion-db flag

Generally makes agent and session setup follow more the patterns used for the api and run commands

Also forces tilde expansion on the run and api commands when passing the session-db as --session-db=~/somepath or --session-db "~/somepath"

Signed-off-by: Christopher Petito <chrisjpetito@gmail.com>
@krissetto krissetto force-pushed the acp-session-persistence branch from ba8c8e5 to a46f4e0 Compare February 4, 2026 22:58
@dgageot dgageot merged commit d0cdc5b into docker:main Feb 5, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Zed session history lost after reload when using cagent as ACP server

3 participants