RT-257: accept the ruled relocation prompt so unattended panes stop stalling - #394
Conversation
…e (RT-257) Claude Code 2.1.281 paints the EnterWorktree relocation prompt under a full-width rule and a Tool use heading with no rounded box. The parser bounded the body by a box top only, so it read the live prompt as no dialog and every board-launched pane that entered an rt worktree by path stalled on an attention gate instead of being accepted. A rule now bounds the body the same way a box top does; a capture with neither still fails closed. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Warning Review limit reachedNext included review available in 7 minutes. View limit detailsLimit details: You’ve used the included review currently available. Your 84 included PR review attempts over the past 7 days set your current allowance at 1 review per hour. Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Comment |
…not by its top alone Review finding on rt#394: every 2.1.x permission prompt paints under the same rule and asks the same question, and a Bash, Edit or MCP prompt shows text the model wrote, so a command echoing the reason phrase with a registered path would have been auto-accepted. A ruled prompt must open with the Tool use heading, an Entering worktree(<path>) echo whose path equals the reason's, and a gutter reason line; a boxed one must carry the EnterWorktree heading. The echo comparison also catches a wrap that drops a space inside the path. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…mmand text cannot paint one Second review round on rt#394: a multi-line Bash command painted a fake ruled dialog inside its indented body, and a boxed command could paint a box top and an EnterWorktree line. The rule must start at column 0, the heading is exactly one space in, the echo three, the reason gutter one, and a boxed top must be a whole line followed by the EnterWorktree line. A wrapped echo is rejoined before the comparison. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…wer than the screen Third review round on rt#394: when both the echo and the reason word-wrap at the same space, both rejoins drop it and agree on a collapsed, registered path. A path or echo split across rows now reads undrivable, so a human answers those (narrow panes), and the keypress only ever commits to a path that sat whole on one row. A rule shorter than some other line on screen is not the dialog's top, since text a command paints is capped short of the pane width. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Three review rounds (Opus reviewer of record, CodeRabbit rate-limited) hardened the original change. Where the parser stands now:
Known limit, pre-existing and true of any screen parser: if Claude Code ever passes raw control sequences (CR, ESC/CSI) through a displayed command, the screen itself can be forged. The full-width rule check blocks the cases a capped-width row can reach. |
A board-launched respond run that enters an existing rt worktree by path stalls on Claude Code's permission-root relocation prompt. The daemon already answers that prompt for registered trees (RT-200), but its parser only recognised the boxed dialog. Claude Code 2.1.281 paints it under a full-width rule and a Tool use heading with no box, so the parser read no dialog, the reconciler opened an attention gate, and the board showed the pane-waiting card until a human answered.
What changed
lib/daemon/trust-dialog.ts: a rule line bounds the dialog body the way a box top does. A capture with neither still fails closed, and the transcript above the rule still cannot supply the path.lib/daemon/__tests__/trust-dialog.test.ts: three cases built from the real capture in the attention gate's context (the ruled prompt parses to the dialog's path, a quoted path above the rule loses to the dialog's own, the reason without the proceed question is not a prompt).Follow-up
Verification
Parser and accept-driver suites 51/51 green; the ruled-prompt case fails on main.
🤖 Generated with Claude Code