Skip to content

Secret entry on a mirrored pane reports success before the secret is sent, and sends Enter as \r text #259

Closed

Description

@devswha

What happens

The secret frame handler checks the prompt on screen, writes ${secret}\r to attachment.pty and immediately answers secret-result with ok: true (server/index.ts:1449-1477, the write and the answer at server/index.ts:1470-1471). On a mirrored pane (a Windows PC), pty is a MirrorSession. Its write fires pane.send_text and discards the result (server/mirror.ts:120-123). As a result:

  • A failed send_text is reported as success, and the masked field closes.
  • Enter goes as \r inside send_text. fix(session): start Gajae Code from New session on a Windows PC #251 found that newlines in send_text do not run a line on Windows; whether \r does is unverified.
  • The comment above the write, "Direct attach keystrokes: no agent transcript, RPC payload or delayed Enter" (server/index.ts:1469), does not hold on a mirror: there the secret travels as a herdr RPC payload on that PC.

Expected

On a mirrored pane, secret-result reflects the actual send, and Enter is a key press.

Ideas

Inside the existing serialize task, a mirrored pane awaits paneSendText(secret) and then paneSendKeys(["Enter"]), and reports a failure as ok: false. Adjust the comment.

Found in a read-only review of Windows support. Nothing was run on a Windows PC.

Activity

  1. added a commit that references this issue on Oct 1, 2026
    e0ce717
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions