Feature Request: Interactive Permission Prompts with Arrow Key Selection
Summary
Add support for interactive terminal menus with arrow key selection for skill permission prompts, similar to questionary (Python) or inquirer (Node.js).
Current Behavior
When skills request permission (e.g., accessing .env files, destructive operations), they present numbered options that require typing:
May I read ~/.code/.env.barb.dev to get that information?
1. Yes (this file only)
2. Yes - always this session
3. No
User must type 1, 2, or 3 and press Enter.
Requested Behavior
Support interactive terminal menus with arrow key selection:
May I read ~/.code/.env.barb.dev to get that information?
> Yes (this file only)
Yes - always this session
No
(Use ↑↓ to select, Enter to confirm)
Use Cases
- Permission prompts: File access, secrets access, destructive operations
- Skill workflows: Any multi-choice decision points in skills
- Configuration: Interactive setup/config flows
- Error recovery: "What should I do?" prompts with options
Benefits
- Faster UX: No typing required, just arrow keys + Enter
- Error prevention: Eliminates typos (typing "3" vs "e" by accident)
- Better discoverability: Users see all options simultaneously
- Native terminal feel: Matches standard CLI tool patterns
- Accessibility: Works with screen readers and keyboard-only users
Technical Implementation Suggestions
Option 1: Built-in Support
Add native support to Claude Code CLI for interactive prompts:
// In a skill or tool
const response = await askUser({
message: "May I read ~/.code/.env.barb.dev?",
type: "select",
choices: [
{ name: "Yes (this file only)", value: "once" },
{ name: "Yes - always this session", value: "session" },
{ name: "No", value: "no" }
]
});
Option 2: Tool Support
Expose existing interactive prompt libraries through a tool:
Use the AskUser tool with interactive: true parameter
Option 3: Fallback Strategy
Detect terminal capabilities and fall back to numbered options if:
- Not in a TTY (CI/CD, redirected output)
- Terminal doesn't support cursor movement
- User preferences disable interactive mode
Related Tools/Libraries
- Python:
questionary,inquirer - Node.js:
inquirer,prompts - Rust:
dialoguer - Shell:
selectbuilt-in
Example: Current Skill Using This
The accessing-env-secrets skill currently uses numbered options for permission requests. With interactive prompts, this would become:
Current (requires typing):
User: "What's the database password for barb prod?"
Claude: "May I read ~/.code/.env.barb.prod?
1. Yes (this file only)
2. Yes - always this session
3. No"
User: "2" [types and presses Enter]
With Interactive (arrow keys only):
User: "What's the database password for barb prod?"
Claude: "May I read ~/.code/.env.barb.prod?
> Yes (this file only)
Yes - always this session
No"
User: [presses ↓, presses Enter]
Backwards Compatibility
Should maintain numbered option support for:
- CI/CD environments
- Piped input/output
- Screen readers that prefer numbered choices
- User preference for traditional prompts
Priority
Medium - This is a quality-of-life improvement that significantly enhances UX for interactive workflows, but the current numbered system is functional.
Related Issues
None known - this appears to be a new feature request.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗