Expose permission_mode in statusLine stdin JSON
Request
Add a permission_mode field to the JSON payload piped to the statusLine.command so user scripts can render their own indicator for auto / plan / bypassPermissions / acceptEdits state.
Why
The statusLine JSON already exposes model.display_name, vim.mode, effort.level, thinking.enabled, context_window.*, rate_limits.*, and cwd. Permission mode is comparable session state that users want visible alongside the rest, but it isn't in the payload — so a custom statusline can't surface it.
Today the only signal is the built-in mode banner (e.g. blue "plan mode on", red "bypass permissions on"), which lives outside the custom statusline and isn't programmatically accessible to it.
Proposal
Add to the stdin JSON:
{
"permission_mode": "default" | "acceptEdits" | "plan" | "bypassPermissions"
}
If feasible, also include default_permission_mode (the configured default) so scripts can detect when the user is temporarily in a non-default mode.
Context
This was raised as the "Alternatively…" paragraph in #52510, but that issue was auto-closed as a duplicate of #50679. #50679 is about a different bug (the statusLine hook not being invoked at all during active turns) and doesn't address the JSON payload. Filing this separately so it doesn't get lost.
Environment
- Custom
statusLine.commandshell script, Linux
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗