1. The Goal: The Ideal Workflow
As a user, I want to configure a workflow that achieves three simultaneous objectives to balance convenience and safety:
- Automatic Approval for File Tools: Tools that modify files within the project workspace (
write_file, replace, save_memory) should be executed automatically without requiring a manual confirmation prompt.
- Manual Approval for Shell Tools: The
run_shell_command tool, due to its potential for high-impact changes, should always require explicit manual approval from the user.
- Reliable Automatic Checkpointing: A recovery checkpoint should be automatically and reliably created before any file system modification occurs, regardless of whether the tool was approved manually or automatically.
Currently, it is not possible to achieve all three objectives simultaneously.
2. The Core Problem: A Conflict in Design
The core issue is a design conflict between the auto-approval mechanisms and the checkpointing trigger. The checkpointing feature appears to be tightly coupled to the manual user approval event, rather than the impending file modification event itself.
As a result, any feature that bypasses the manual approval prompt (like tools.allowed or approval-mode=auto_edit) also bypasses the trigger for creating a checkpoint. This forces users into an undesirable trade-off: choose convenience and sacrifice the safety of checkpoints, or choose safety and sacrifice the convenience of auto-approval.
3. What We've Tried: A Log of Unsuccessful Attempts
To solve this, we have systematically tested every available mechanism, all of which have failed to meet the three core objectives.
Attempt # 1: Using tools.allowed
- Configuration: We added
write_file, replace, and save_memory to the tools.allowed array in settings.json.
- Result:
- ✅ File tools were auto-approved.
- ✅ Shell tools still required manual approval.
- ❌ Failure: No checkpoints were created for the auto-approved actions. The
/restore command remained empty.
- Reference: This aligns with the
checkpointing.md documentation, which states checkpoints are created "When you approve a tool...". Bypassing the prompt means no approval event occurs.
Attempt # 2: Using --approval-mode=auto_edit
- Configuration: We removed the
tools.allowed setting and launched the CLI with the --approval-mode=auto_edit flag.
- Result:
Attempt # 3: Manually Triggering Checkpoints with run_shell_command
- Idea: Can we manually create a checkpoint by forcing a manually-approved, safe shell command (e.g.,
run_shell_command(command='true')) before running the main prompt?
- Result:
- ❌ Failure: Even when
run_shell_command is manually approved, it does not trigger the checkpointing mechanism. It seems the trigger is specific to tools explicitly classified as file-modifying.
Attempt # 4: The Only "Working" (but flawed) Workaround
- Idea: Manually trigger a checkpoint using a file-modifying tool that is not in the
tools.allowed list.
- Workflow:
- Remove all file-modifying tools from
tools.allowed.
- Before the main task, issue a prompt to create a temporary file (e.g.,
/checkpoint custom command).
- Manually approve this action, which successfully creates a checkpoint.
- Issue the main prompt.
- Manually approve the actual file modification again.
- Result:
- ✅ Checkpoints are created reliably.
- ❌ Failure: This defeats the primary goal of auto-approving file tools and makes the workflow extremely cumbersome.
4. Proposed Solution: Decouple the Checkpointing Trigger
To resolve this conflict, we propose that the checkpointing mechanism be decoupled from the manual approval UI event.
Instead, the trigger for creating a checkpoint should be moved deeper into the execution pipeline. It should be activated whenever the system is about to execute any tool that has been tagged or classified internally as "file-system-modifying," regardless of how that tool's execution was authorized (manually, tools.allowed, or auto_edit).
This change would make the features orthogonal and allow for the ideal, safe, and convenient workflow that users expect. Thank you for considering this improvement.
1. The Goal: The Ideal Workflow
As a user, I want to configure a workflow that achieves three simultaneous objectives to balance convenience and safety:
write_file,replace,save_memory) should be executed automatically without requiring a manual confirmation prompt.run_shell_commandtool, due to its potential for high-impact changes, should always require explicit manual approval from the user.Currently, it is not possible to achieve all three objectives simultaneously.
2. The Core Problem: A Conflict in Design
The core issue is a design conflict between the auto-approval mechanisms and the
checkpointingtrigger. Thecheckpointingfeature appears to be tightly coupled to the manual user approval event, rather than the impending file modification event itself.As a result, any feature that bypasses the manual approval prompt (like
tools.allowedorapproval-mode=auto_edit) also bypasses the trigger for creating a checkpoint. This forces users into an undesirable trade-off: choose convenience and sacrifice the safety of checkpoints, or choose safety and sacrifice the convenience of auto-approval.3. What We've Tried: A Log of Unsuccessful Attempts
To solve this, we have systematically tested every available mechanism, all of which have failed to meet the three core objectives.
Attempt # 1: Using
tools.allowedwrite_file,replace, andsave_memoryto thetools.allowedarray insettings.json./restorecommand remained empty.checkpointing.mddocumentation, which states checkpoints are created "When you approve a tool...". Bypassing the prompt means no approval event occurs.Attempt # 2: Using
--approval-mode=auto_edittools.allowedsetting and launched the CLI with the--approval-mode=auto_editflag.Attempt # 3: Manually Triggering Checkpoints with
run_shell_commandrun_shell_command(command='true')) before running the main prompt?run_shell_commandis manually approved, it does not trigger the checkpointing mechanism. It seems the trigger is specific to tools explicitly classified as file-modifying.Attempt # 4: The Only "Working" (but flawed) Workaround
tools.allowedlist.tools.allowed./checkpointcustom command).4. Proposed Solution: Decouple the Checkpointing Trigger
To resolve this conflict, we propose that the checkpointing mechanism be decoupled from the manual approval UI event.
Instead, the trigger for creating a checkpoint should be moved deeper into the execution pipeline. It should be activated whenever the system is about to execute any tool that has been tagged or classified internally as "file-system-modifying," regardless of how that tool's execution was authorized (manually,
tools.allowed, orauto_edit).This change would make the features orthogonal and allow for the ideal, safe, and convenient workflow that users expect. Thank you for considering this improvement.