feat: add permission_mode to statusline payload + hidePermissionModeIndicator setting

Resolved 💬 4 comments Opened May 6, 2026 by lczyk Closed May 6, 2026

Problem

i use a custom statusline via statusLine.command. i'd like to fold the ⏵⏵ bypass permissions on (shift+tab to cycle) row into my custom statusline to reclaim a screen row. two things block this:

  1. the statusline JSON payload doesn't include permission_mode — so my statusline script can't render it
  2. there's no hidePermissionModeIndicator toggle — so even if i render it myself, the built-in row is still shown (i'd see it twice)

the vim-mode case already has both: vim.mode in the payload + hideVimModeIndicator to suppress the -- INSERT -- line. this is the same pattern, just for permission mode.

Proposed changes

1. permission_mode in the statusline payload

the buildStatusLineCommandInput function in StatusLine.tsx calls createBaseHookInput() with no arguments:

...createBaseHookInput(),

createBaseHookInput already accepts permissionMode as its first arg and already emits permission_mode in its return type. permissionMode is already in scope. the fix is:

...createBaseHookInput(permissionMode),

the field gets dropped by JSON.stringify when undefined — so with no arg it never reaches the statusline script.

2. hidePermissionModeIndicator setting

two sub-changes:

a. settings schema (settings/types.ts): add hidePermissionModeIndicator: z.boolean().optional() alongside the existing statusLine block. describe it as "Hide the built-in permission mode indicator (useful when rendering it in a custom statusline)."

b. ModeIndicator component (PromptInputFooterLeftSide.tsx): the modePart constant renders the ⏵⏵ bypass permissions on row. wrap it to check the new setting — if hidePermissionModeIndicator is true, render null for modePart.

Prior art

  • hideVimModeIndicator already exists as a toggle for the vim mode row
  • vim.mode already exists in the statusline payload
  • this request is the permission-mode analogue of both

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗