feat(agent): enable delegated command execution - #347
Open
fcoury-oai wants to merge 1 commit into
Open
Conversation
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.
Delegate threads introduced by #346 run in isolated worktrees, but isolation alone is not enough for longer autonomous tasks: they need to run builds and tests, expose useful progress, and remain interruptible without changing Pair behavior.
This change gives Delegate sessions a native Codex workspace-write sandbox scoped to the delegated worktree. Network access and temporary-directory writes remain disabled, while Pair sessions keep their existing read-only policy.
The Threads workspace now shows the current delegated command in the running row and its full status in the detail pane. Running delegates can be stopped with
x; the conversation remains available with a Stopped status and cannot be incorrectly promoted to Ready to review by the later interruption event.Depends on #346.
How to Test
cargo test. Confirm the command runs inside the delegated worktree while the current Pair thread stays selected.xon its running thread. Confirm Red reports that it is stopping, preserves the conversation, and shows Stopped rather than Ready to review after interruption completes.xon a Pair thread or a delegate that is not running. Confirm no session is cancelled and Red explains that only running delegated work can be stopped.Targeted automated coverage includes
delegated_app_server_uses_workspace_write_and_reports_command_activity,bundled_agent_threads_show_and_stop_running_delegate_activity,stopped_delegate_does_not_become_ready_when_interruption_finishes, andcommand_execution_reports_bounded_progress_without_output.