You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DialogPromptOptions in the TUI plugin API has title, description, placeholder and value and nothing else (packages/plugin/src/tui/context.ts:348-353 at 2.0.31, 83c5abbbe3). ui.dialog.prompt (:403) therefore always echoes what the operator types. There is no way for a plugin to collect a password, token or passphrase without it showing on screen.
This is separate from #43132 (a plugin UI surface for web/desktop): even on the TUI, where plugins do get dialogs, a secret cannot be entered safely through the stock prompt.
Why we hit it
A sudo passthrough plugin: shell calls that elevate are rewritten to sudo -A, and the askpass helper has to get the password from the operator and hand it to sudo. The password must never be echoed, never reach the model, and never be written to the session. Today the only option is to build a custom masked input inside the plugin, which works on the TUI but is a lot of surface for one boolean and gives nothing on other clients.
A credential-vault plugin has the same need when enrolling a provider key interactively.
The ask
An option on the prompt dialog, something like
exportinterfaceDialogPromptOptions{readonlytitle: stringreadonlydescription?: stringreadonlyplaceholder?: stringreadonlyvalue?: stringreadonlysecret?: boolean// render `*` per character; never echo}
rendered as masked input in the TUI, and (once #43132 lands) in the web app with the same flag. The resolved string is returned to the plugin as today; the host should not log it or keep it in dialog state after the promise settles.
Happy to send a PR for the TUI side if the shape is acceptable.
Thanks for the clear write-up! You're asking for a secret option on DialogPromptOptions so that ui.dialog.prompt shows masked input instead of echoing it. That would let plugins collect passwords, tokens or passphrases safely, with the host keeping the value out of logs and dialog state once the prompt resolves.
I checked the current code. DialogPromptOptions (packages/plugin/src/tui/context.ts) still has only title, description, placeholder and value, and the TUI has no masked input mode to fall back on. So a plugin can't do this with the stock prompt today, and the only workaround is the custom input you described.
The maintainers will consider it, and they can say whether the proposed shape works for them before you put time into a PR.
Activity
opencode-agent commentedon Oct 18, 2026
Thanks for the clear write-up! You're asking for a
secretoption onDialogPromptOptionsso thatui.dialog.promptshows masked input instead of echoing it. That would let plugins collect passwords, tokens or passphrases safely, with the host keeping the value out of logs and dialog state once the prompt resolves.I checked the current code.
DialogPromptOptions(packages/plugin/src/tui/context.ts) still has onlytitle,description,placeholderandvalue, and the TUI has no masked input mode to fall back on. So a plugin can't do this with the stock prompt today, and the only workaround is the custom input you described.The maintainers will consider it, and they can say whether the proposed shape works for them before you put time into a PR.
Related issues: