Skip to content

Expose the agent's permission/plan mode as a control in the prompt box #256

Open

Description

@jesse-adapta

Environment: Parallel Code 1.12.0 (deb), Linux, Claude Code agent. Code references verified against main @ d000fff65.

Problem

Claude Code has a permission-mode cycle (default → auto-accept edits → plan mode, normally cycled with Shift+Tab). Right now the only way to change it is to click into the agent's terminal pane and press Shift+Tab there.

Request

Add a mode control to PromptInput (src/components/PromptInput.tsx), next to the send button:

  • Shows the agent's current mode.
  • Click (or a keybinding while the prompt box is focused) cycles it — implemented by sending the agent's mode-cycle key to the PTY, so no agent-side integration is needed.
  • Ideally the sent prompt uses whatever mode is selected at send time, so I can pick "plan" and send in one gesture.

Activity

  1. LarryHu0217 commented on Aug 9, 2026

    @LarryHu0217
    Contributor

    I checked this against current main (d000fff). Sending Claude's mode-cycle key from PromptInput is straightforward (\x1b[Z), but the app currently has no authoritative permission-mode state. The only observable source is Claude's rendered PTY footer, and getAgentOutputTail() is not itself reactive. Tracking the mode only after button clicks would drift whenever the user presses Shift+Tab in the terminal.

    Would you be comfortable with a Claude-only first pass that:

    • parses normalized PTY frames into default, accept edits, plan, or bypass permissions when Claude exposes one of those footer labels;
    • shows the control only for Claude Code, with an explicit unknown state until a recognizable footer is observed;
    • sends exactly one Shift+Tab sequence per click while keeping focus in the prompt box; and
    • uses recorded-frame tests for mode detection plus a focused control test for the PTY write?

    I would avoid optimistically cycling local state, so the displayed value always comes back from the agent's output. If that scope matches what you want, I can take it.

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