Skip to content

fix(acp): preserve assistant reasoning metadata in session persistence (salvage #13575)#20296

Merged
teknium1 merged 2 commits into
mainfrom
salvage/pr-13575
May 5, 2026
Merged

fix(acp): preserve assistant reasoning metadata in session persistence (salvage #13575)#20296
teknium1 merged 2 commits into
mainfrom
salvage/pr-13575

Conversation

@teknium1

@teknium1 teknium1 commented May 5, 2026

Copy link
Copy Markdown
Contributor

Salvages @Aslaaen's PR #13575 onto current main.

What it does

ACP save_session() called db.append_message() without the reasoning / reasoning_details / codex_reasoning_items kwargs, so those fields were dropped on every session save and resumed sessions lost their thinking/reasoning context.

Changes

  • acp_adapter/session.py — pass the three reasoning fields to append_message.
  • tests/acp/test_session.py — round-trip regression test.
  • scripts/release.py — AUTHOR_MAP entry for Aslaaen.

Relationship to #20279

Salvage PR #20279 (for #13675) rewrites save_session to use replace_messages instead of clear_messages + append_message loop. Once #20279 lands, replace_messages already handles these reasoning fields and this fix becomes a no-op. Both PRs are safe to land in either order.

Validation

tests/acp/test_session.py — 40 passed locally.

Closes #13575 via salvage.

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/acp Agent Communication Protocol adapter labels May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/acp Agent Communication Protocol adapter P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants