You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
takeover: take control from the native viewer, and agent-requested takeover #341
Part of #338. Finishes the take-control increment of #207 on the native viewer.
Problem
Taking control needs pickforge-lab watch --control and an external VNC client. The agent cannot ask for help in a way the user notices, and it learns about a takeover only from busy errors.
Acceptance criteria
The expanded native viewer has a "Take control" button. It acquires the existing human lease, with the same permit draining, heartbeat and watchdog as watch --control.
While the lease is valid, the viewer sends the human's pointer, scroll and keyboard input to the session's display. Text arrives correctly in any host layout, including accents and dead keys such as Brazilian ABNT2. Input stops the moment the lease ends or fails to renew.
"Return control" and closing the window end the lease. A viewer crash is recovered by the watchdog. Every key, including Esc, goes to the session during control.
While a human holds control, desktop_screenshot and desktop_wait fail closed with busy, like input and the DevTools relay.
A new MCP tool, request_takeover, takes a message and an optional timeout. The viewer grows and shows the message, and a desktop notification appears. Nothing takes keyboard focus. The tool returns when the human returns control, on timeout, or on cancel, with the outcome and a fresh screenshot.
With viewer.mode: "auto", MCP opens the viewer when none is open. Without it, request_takeover returns the exact CLI command for the user instead.
A new MCP tool, takeover_wait, waits until no human lease is active.
request_user_input guidance for secrets points to request_takeover.
No writable network server exists at any point.
Checklist
Viewer take and return through the lease
Input forwarding with keysym mapping
Screenshot and wait busy during control
request_takeover, takeover_wait, notification and viewer signalling
MCP opens the viewer with viewer.mode: "auto"
Security tests, README, SECURITY.md and docs/releases/UNRELEASED.md
Activity
ElbertePlinio commentedon Oct 28, 2026
The technical plan for this issue is in the #340 plan comment, sections 2 to 7. This PR stacks on #340.