Skip to content

fix: append only unsaved session messages per graph thread - #232

Merged
keceli merged 1 commit into
mainfrom
fix/session-history-duplication
Sep 6, 2026
Merged

fix: append only unsaved session messages per graph thread#232
keceli merged 1 commit into
mainfrom
fix/session-history-duplication

Conversation

@tdpham2

@tdpham2 tdpham2 commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

After each ordinary agent turn, the compiled graph returns the accumulated transcript. Appending that entire snapshot stored six messages and three queries after only two turns. Track successfully saved message identities per normalized thread and append only new messages, so two turns store four messages and two queries.

Use graph IDs when available and transcript position plus normalized payload otherwise. Retain repeated text and separate thread histories, retry failed writes, and pass the UI submission's actual thread ID. Preserve SessionStore's append API and the durable main-agent path; historical rows are not rewritten.

Related issues

Release prerequisite for #227.

Type of change

  • Bug fix

How was this tested?

  • ruff check . and git diff --check passed.
  • Full suite with Academy/Parsl/Globus extras: 809 passed, 21 skipped, 2 deselected, using temporary storage and loopback access for local test servers.
  • Focused session/UI/memory/durable-agent suite: 127 passed.
  • New regressions use a compiled LangGraph with a fake LLM and temporary SQLite: cumulative turns, repeated text, identical snapshots, normalized/alternating threads, ID-based identity, failed-write retry, and the UI caller.

Checklist

  • Branched off the latest main and targets main
  • Focused on future ordinary-agent session writes
  • ruff check . passes
  • pytest tests/ -k "not tblite" passes
  • Added regression coverage
  • No database migration or historical cleanup

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-05T03:40:32.947836Z f634b3a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@tdpham2
tdpham2 requested a review from keceli September 5, 2026 03:48
@keceli keceli mentioned this pull request Sep 6, 2026
10 tasks
@keceli
keceli merged commit 96d21c7 into main Sep 6, 2026
43 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in ChemGraph Roadmap Sep 6, 2026
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.

2 participants