Skip to content

Add command handoff extension and permission recovery skill - #27

Merged
IzumiSy merged 1 commit into
mainfrom
feat/command-handoff
Oct 25, 2026
Merged

IzumiSy merged 1 commit into
mainfrom
feat/command-handoff

Conversation

@IzumiSy

@IzumiSy IzumiSy commented Oct 25, 2026

Copy link
Copy Markdown
Owner

Motivation

When a necessary shell command cannot run with the agent’s permissions, the task needs a clear way to ask the user to execute it and then continue from the recorded result. Manual copying and continuation messages interrupt that workflow, while automatic retries or privilege escalation can conflict with the user’s intent or security policy.

Design Decision

Keep execution under user control

Expose a generic, sequential request_command_handoff tool that confirms the command, stages editable ! input, and pauses the agent. It never executes the command itself, grants permissions, or bypasses existing user-shell handlers.

Separate permission guidance from mechanics

Use a companion permission-handoff skill instead of an automatic permission-error hook. The model decides whether handoff is appropriate, and the skill explicitly preserves refusals and security restrictions and warns about repeating commands with partial side effects.

Resume only while the handoff remains valid

Resume once the unchanged command’s result is recorded, including failures. Cancel automatic continuation when input, submissions, queued messages, or session/branch navigation invalidate the handoff. Since Pi has no public user-shell completion event, watch new in-memory history entries only while a handoff is pending; document the matching limitations.

Summary

  • Add and register the interactive-TUI-only command handoff extension, with confirmation, serialized requests, draft/queue safeguards, and one-time continuation.
  • Add the permission-recovery skill and document setup, behavior, and limits.
  • Add regression coverage for handoff acceptance and cancellation, operation signals, concurrency, result matching, and session lifecycle changes.

@IzumiSy
IzumiSy marked this pull request as ready for review October 25, 2026 15:42
@IzumiSy
IzumiSy merged commit 7426bc7 into main Oct 25, 2026
1 check passed
@IzumiSy
IzumiSy deleted the feat/command-handoff branch October 25, 2026 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant