Skip to content

Add optional Remote Control for task sessions#557

Open
kylecarbonneau wants to merge 3 commits into
bborn:mainfrom
kylecarbonneau:pr/remote-control
Open

Add optional Remote Control for task sessions#557
kylecarbonneau wants to merge 3 commits into
bborn:mainfrom
kylecarbonneau:pr/remote-control

Conversation

@kylecarbonneau
Copy link
Copy Markdown

@kylecarbonneau kylecarbonneau commented Jun 5, 2026

Add optional Remote Control for task sessions

What

Adds an opt-in --remote-control mode for tasks. When enabled, a task launches its
Claude 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).

  • New RemoteControl bool on the Task model — DB column remote_control (default 0,
    with migration), wired through CreateTask / UpdateTask and all scan sites.
  • ty create --remote-control flag.
  • remote_control boolean on the taskyou_create_task MCP tool.
  • Executor launches claude with --remote-control "<title>" (falls back to task-<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.
  • Gate test: a remote-control task coexists with ty hooks — status tracks processing ⇄ blocked,
    and the session is drivable by both Remote Control and ty input / ty output.
  • Cross-platform: no OS-specific code paths added.

Notes

@kylecarbonneau
Copy link
Copy Markdown
Author

#559 Makes "suppresses the task-guidance system-prompt preamble" irrelevant.

kylecarbonneau and others added 3 commits June 6, 2026 11:19
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>
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