Skip to content

[agentbricks] Fix LangGraph history and local-state setup hints - #686

Open
shivam5 wants to merge 1 commit into
mainfrom
codex/bugbash-local-state-independent
Open

shivam5 wants to merge 1 commit into
mainfrom
codex/bugbash-local-state-independent

Conversation

@shivam5

@shivam5 shivam5 commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Managed LangGraph history was read as a browser-written transcript even though the agent saves checkpoints. Successful API turns therefore appeared as empty history, and the UI's second transcript could omit tools and pending approvals. Use the existing graph.aget_state() history path for both session backends, and refresh that history after sending/resuming instead of writing duplicate transcript items.

Also correct the store-binding next steps: agentbricks dev intentionally keeps memory off and session history in-process; bindings take effect after deployment. This is a five-file fix: 9 added lines and 49 removed lines.

Partially addresses ML-70354:

  • Chang Shi feedback, Functionality → Sessions steps 1–3; Memory: setup instructions incorrectly promise local use of bound stores.
  • Fabian's chatbot log, Codex friction points 1–2: local behavior and authoritative UI/API history.

Validation:

Scenario Before (ed3ed6b7) After
API turn saved through the real LangGraph managed-checkpoint serializer, using a local test transport HTTP 200; UI history empty despite 11 stored checkpoint records User message and assistant reply returned in order
Reply completes in parallel with an approval pause HTTP 200; UI history and interrupts empty despite 10 checkpoint records Both messages and the pending approval returned
Same generated UI regression suite 23 passed, 1 history assertion failed 24 passed

A freshly generated local agent also invoked system.ai.claude-sonnet-4-5 through ml-inference-staging: the invocation completed in 4.0s, then UI history returned its two messages in 0.67s. This exercised the real model with in-process state; it provisioned no workspace resources. Memory/session CLI tests: 15 passed. Ruff, format, type checking, JavaScript syntax, and secret scanning passed.

Scope: default local state behavior is preserved. Workspace-backed local development, broader request-user identity changes, and pagination are deferred. Template fixes apply to newly generated projects; existing copied scaffolds need the equivalent small edits. No new deployed-app test was run for this reduced patch.

This branch has not been deployed

No deployments
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.

1 participant