Add optional Remote Control for task sessions#557
Open
kylecarbonneau wants to merge 3 commits into
Open
Conversation
Author
|
#559 Makes "suppresses the task-guidance system-prompt preamble" irrelevant. |
Lets a task opt into launching its Claude session as a remote-drivable (--remote-control) session, so it appears at claude.ai/code and on phone while remaining ty-managed. - RemoteControl flag on tasks (DB column + CreateTask/UpdateTask + scans) - ty create --remote-control; remote_control on taskyou_create_task MCP tool - Executor launches claude with --remote-control and suppresses the task-guidance preamble + initial prompt for RC (interactive) sessions
Extract the triplicated Remote Control flag logic into a single rcFlag(task) helper alongside effortFlag/claudePermissionFlag, and replace the two inlined blocks at the claude launch sites with calls to it. Behavior is byte-identical; the systemPromptFlag/promptArg RC-suppression stays inline. Add tests: - internal/db: RemoteControl CreateTask -> GetTask round-trip (true and default-false). - internal/executor: rcFlag unit test (enabled contains flag + name, disabled empty, empty title falls back to task-<id>). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ves the injection)
89abc13 to
dfe12c9
Compare
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.
Add optional Remote Control for task sessions
What
Adds an opt-in
--remote-controlmode for tasks. When enabled, a task launches itsClaude session as a remote-drivable session (
claude --remote-control "<name>"),so it appears at claude.ai/code and in the phone app — while remaining fully ty-managed
(status tracking,
ty input/ty output).RemoteControl boolon theTaskmodel — DB columnremote_control(default0,with migration), wired through
CreateTask/UpdateTaskand all scan sites.ty create --remote-controlflag.remote_controlboolean on thetaskyou_create_taskMCP tool.--remote-control "<title>"(falls back totask-<id>).For remote-control (interactive) sessions it skips the initial piped task prompt, so the
human gets a clean interactive session to drive. Non-RC behavior is byte-identical.
(The hardcoded task-guidance system prompt is removed separately in Remove hardcoded TASK GUIDANCE; default 'code' task type owns it instead #559; this PR no
longer touches it.)
Why
Some tasks are better driven interactively by a human (from the web or phone) while still
benefiting from ty's queue, worktree isolation, and status tracking. This makes that a
first-class, opt-in option instead of an either/or choice.
How tested
go build ./...clean;go vet ./...clean;go test ./internal/executor/... ./internal/db/...passing.and the session is drivable by both Remote Control and
ty input/ty output.Notes
permission-mode disambiguation is intentionally left to Disambiguate "auto" permission mode from Claude Code auto mode (label as "accept edits") #556.