fix(tools): forward checkpoint methods through Arc<ShellExecutor>#5998
Merged
Conversation
impl ToolExecutor for std::sync::Arc<ShellExecutor> predates the checkpoint feature and never overrode checkpoint_undo/redo/list, so they silently fell through to the trait's unsupported default. Since agent_setup.rs wraps the shell executor in an Arc before building the executor chain, every checkpoint call resolved against this incomplete impl instead of ShellExecutor's own correct one, breaking /undo, /redo, and /undo list in the plain default production wiring. Closes #5985
This was referenced Jul 10, 2026
bug-ops
enabled auto-merge (squash)
July 10, 2026 23:41
This was referenced Jul 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
impl ToolExecutor for std::sync::Arc<ShellExecutor>incrates/zeph-tools/src/shell/mod.rspredates the checkpoint feature and only overrodeexecute/tool_definitions/execute_tool_call/set_skill_env, socheckpoint_undo/checkpoint_redo/checkpoint_listsilently fell through to the trait's unsupported default.agent_setup.rswraps the shell executor in anArcbefore building the executor chain, every checkpoint call resolved against this incomplete impl instead ofShellExecutor's own correct one, so/undo,/redo, and/undo listalways reported "Checkpoints are not enabled" in the plain default production wiring — nocapability_scopes/shadow_sentinelgating required to reproduce.self.as_ref().checkpoint_X(...)), mirroring the existingexecute_tool_callforwarding pattern in the same impl block.Arc<ShellExecutor>was the only active instance of this pattern (a structurally similar but currently harmless case exists inDynSchedulerExecutor, noted below).Closes #5985
Test plan
arc_wrapped_executor_forwards_checkpoint_methodsregression test incrates/zeph-tools/src/shell/tests.rs, constructing a realArc<ShellExecutor>and calling checkpoint methods through theArchandle as adyn ToolExecutor— independently verified by two reviewers to fail pre-fix and pass post-fix (not a false-positive test).cargo +nightly fmt --checkcargo clippy --profile ci --workspace --all-targets --features "desktop,ide,server,chat,pdf,scheduler,testing" -- -D warningscargo nextest run --workspace --features "desktop,ide,server,chat,pdf,scheduler" --lib --bins— 12646 passed, 0 failedcargo nextest run -p zeph-tools(full crate) — 1355 passed, 0 failedFollow-ups (not in scope for this PR, to be filed separately)
DynSchedulerExecutor(src/scheduler_executor.rs:519) is a structurally similar shadow-wrapper pattern — parity-correct today but the same footgun shape.capture_snapshot_forsilently drops checkpoints for newly-created files under symlinkedallowed_pathsprefixes on macOS (canonicalize()/absolute()don't resolve/tmp→/private/tmp), only atracing::warn!, no user-visible error.checkpoint_redo-with-no-prior-undo,checkpoint_listordering with 2+ entries, or multi-checkpoint undo-stack depth (pre-existing gap, not introduced by this fix).