Expose permission_mode in statusLine stdin JSON

Open 💬 0 comments Opened Jul 15, 2026 by sindrehenriksen

What

Add the current permission mode (e.g. default, acceptEdits, plan, bypassPermissions) to the JSON passed to statusLine commands on stdin — e.g. a top-level permission_mode field.

Why

Custom status lines already render most live session state from the stdin JSON — model, effort/thinking, vim mode (.vim.mode), context usage, rate limits. Permission mode is one of the few pieces not exposed, so a custom statusLine can't show which mode the session is in. Exposing it lets users place the indicator wherever it fits their own layout.

Proposed shape

{
  "permission_mode": "acceptEdits",
  ...
}

Mirrors the existing .vim.mode / .model / .effort fields. Read-only — no change to the built-in indicator's behavior.

---

Re-file of #66318, which was auto-closed by the stale bot for inactivity ("Closing for now — inactive for too long"), not resolved on merit. #66318 was itself a re-file of #54032, closed the same way. Related: #46419.

View original on GitHub ↗