Simplify tool configuration to boolean `unattended` with runtime interaction choices
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16
- Forks
- 3
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 121
Description
The current tool calling configuration system requires users to pre-configure whether tools run in always, ask, or edit mode. This creates inflexibility when users can't predict beforehand whether they'll want to review, edit, or run a tool directly during an interactive session.
Context
Currently, tool configuration uses a RunMode enum with three values:
Always: Run without confirmation (should probably be renamed to "unattended")Ask: Prompt for confirmation before runningEdit: Open editor to modify tool call arguments before running
Users must decide the interaction mode at configuration time, but in practice, the choice between asking for confirmation vs. editing often depends on the specific context of the tool call, which isn't known until runtime.
According to the current implementation in crates/jp_config/src/mcp/server/tool.rs, tools default to RunMode::Ask, and the interaction flow in crates/jp_cli/src/cmd/query/event.rs shows that when in Edit mode, if users empty the arguments, the system falls back to Ask mode anyway.
Alternatives
Users could work around this limitation by:
- Setting all tools to
Editmode and simply saving without changes when they don't want to edit - Dynamically reconfiguring tools before each session
- Using different configuration profiles for different scenarios
However, these alternatives add unnecessary complexity and cognitive overhead.
Proposed Implementation
Replace the current three-state RunMode enum with:
- A simple boolean
unattendedfield in tool configuration - For attended tools (
unattended = false), show a four-choice runtime prompt:run- Execute the tool call as-isreject- Skip the tool call entirelyreject with message- Skip with custom rejection messageedit- Open editor to modify arguments before running
This approach separates the configuration concern (attended vs. unattended) from the runtime interaction choice (run/reject/edit), providing better user experience and more appropriate defaults.
Tasks
- Update
RunModeenum incrates/jp_config/src/mcp/server/tool.rsto a booleanunattendedfield - Modify the tool calling interaction logic in
crates/jp_cli/src/cmd/query/event.rsto show four-choice prompt for attended tools - Add "reject with message" functionality that returns a custom user-provided message instead of tool results
- Update configuration parsing and validation to handle the new boolean field
- Update documentation to reflect the new configuration approach
- Consider backward compatibility or migration path for existing configurations
Resources
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the RunMode definition in crates/jp_config/src/mcp/server/tool.rs and the interaction flow in crates/jp_cli/src/cmd/query/event.rs. Trace configuration parsing and validation from those entry points, then identify the existing tests or checks for tool calls. Done means attended tools offer run, reject, reject with message, and edit choices, while configuration and documentation reflect the boolean field and any migration path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100