fix: surface a plain-string interrupt's payload in the HITL prompt (Closes #95) - #96
Merged
Merged
Conversation
…#95) A bare-string interrupt("Approve deleting X?") rendered "(no action details provided)" — the user was asked to Approve/Reject blind. The CLI renderer already handled a scalar (format_interrupt_request returns str(action)); the payload was dropped upstream in langstage-core's on_interrupt handler (json.loads on a non-JSON string -> empty request). Fixed in langstage-core 1.0.28 (chunk wire the CLI consumes); this raises the core floor to >= 1.0.28 so a fresh install gets it, with a regression test pinning the frame + render. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011HWCfJii6gXd3XL3Gq3W8B
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #95.
A bare-string
interrupt("Approve deleting ALL files in /home? (y/n)")— the most common LangGraph HITL form — rendered(no action details provided), asking the user to Approve/Reject blind. Dict payloads rendered fine; only the scalar case was lost.The CLI renderer was never the problem —
format_interrupt_requestalready returnsstr(action)for a scalar. The payload was dropped two layers up inlangstage-core'son_interrupthandler, which ranjson.loads()on the string, failed (a plain question isn't JSON), and fell back to an empty request. Fixed in langstage-core 1.0.28 on the chunk wire the CLI consumes; this PR raises the floor to>= 1.0.28sopip install langstage-cligets it.Verified end to end (the frame now carries the string, the renderer shows it):
Regression test pins both the frame payload and the render. Full suite 143 passed.
🤖 Generated with Claude Code
https://claude.ai/code/session_011HWCfJii6gXd3XL3Gq3W8B