Repository navigation
bridge: stop prompts from leaving a turn stuck (card refusals, claude questions and mcp forms) - #168
Merged
Merged
Conversation
…s, and stop offering deny rules that allow - askuserquestion fields are keyed by position instead of question text. a question with a newline or over the id limit used to be dropped, which could leave a card with nothing to answer. answers still reach claude keyed by the full question text. - a declined mcp elicitation or unsupported dialog is an error notice, so it shows in the chat with the server and what it asked. as a warning it only reached the logs and the tool silently didn't run. - a permission suggestion with a deny rule is no longer offered: its only way back is an allow answer, which would run the tool the person refused.
…t a terminal a card inline refused twice left its request pending and told the person to "continue in the terminal", which a bridge user doesn't have, so the turn waited forever. the request is now cancelled as the owner, the way a released session cancels its open requests, and the chat says it was declined so the agent goes on. a form card skips the plain-text retry, which kept no way to answer it. tapping a card from before a restart now says the request is no longer pending instead of doing nothing.
…single-choice questions answerable as text, and post no ghost card from the pre-merge review: - the cancel posted the refused card again as a new "answered by" message, since closing it rendered a card update for a card never shown. the renderer now forgets the interaction before the cancel. - a request from before a restart (or one that ended while its card was retried) is left alone: its id could name another request of the new session, and there is nothing to answer. - a request that ended meanwhile gets no "/stop" notice. - only a form drawn as fields skips the plain-text retry; single-choice questions keep their buttons as text, as before. - a declined mcp form quotes at most 160 characters of the server's message.
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.
Part of closing every way a bridge prompt can leave someone stuck with nothing to press. An audit of both harnesses on main split the work three ways: Codex prompt shapes (incl. the MCP tool approval with no buttons) are in the Codex approval-cards branch, a message typed while an approval waits is in #167, and this PR covers the rest.
Both harnesses
Claude Code
q0.Tests: 1,131 CLI, 395 agent-bridge and 80 Claude driver tests pass, and clippy is clean. New mapper tests cover the long question, the deny suggestion and the declined form. The refused-card cancel isn't covered by a test: the bridge tests can't make Inline refuse a post without a fake API.
🤖 Generated with Claude Code