Skip to content

fix(byo): persist sessions across actor suspension - #2926

Open
Dragonzz27 wants to merge 2 commits into
kagent-dev:mainfrom
Dragonzz27:fix/byo-durable-sessions
Open

Dragonzz27 wants to merge 2 commits into
kagent-dev:mainfrom
Dragonzz27:fix/byo-durable-sessions

Conversation

@Dragonzz27

Copy link
Copy Markdown
Contributor

Closes #2921

Set the BYO compiler's session_db_url to /data/sessions.db, matching the kagent compiler. The Go ADK can then keep session state in the actor's durable directory instead of memory.

The compiler test checks the generated URL, and the existing BYO checkpoint E2E is no longer skipped.

Validation: gofmt -d and git diff --check passed. Go unit tests and Kind E2E were not run locally because the module cache could not be completed and Kind/Docker are unavailable.

Signed-off-by: Dragonzz27 <82201310+Dragonzz27@users.noreply.github.com>
@Dragonzz27
Dragonzz27 requested a review from a team as a code owner September 24, 2026 04:31
@github-actions github-actions Bot added the bug Something isn't working label Sep 24, 2026
return nil, err
}
template, harness := input.Root.Template, input.Harness
compiled.Config.SessionDBURL = "sqlite+aiosqlite:////data/sessions.db"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why is this not being set in c.config.Build?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good point. I moved the session DB URL into adkconfig.Build, removed the duplicate assignments from both compilers, and added a builder test.

Signed-off-by: Dragonzz27 <82201310+Dragonzz27@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] A byo runtime loses the conversation at every suspend: the byo compiler never sets session_db_url

2 participants