docs(spec): reverse path — Telegram → live session input (orc run + PTY) - #24
Merged
Merged
Conversation
…PTY) Scopes two-way control: replying in a Telegram topic injects input into the corresponding live session. Documents the hard constraint (only orc-launched PTY sessions are driveable; observed sessions stay read-only), reuses the existing host_command downstream channel + PtySession safety gate, and lays out 5 phased PRs with approval-first gating as the safety core.
This was referenced Jul 2, 2026
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.
Goal
Spec for the reverse path you asked for: reply in a Telegram topic → input lands in the live coding session. Produced from a Sonnet scoping pass over the actual code, reviewed and structured by Opus.
The decision this spec forces
Input injection is only feasible for sessions orc launches under its own PTY (
orc run). Observed sessions (Claude Code already running in VS Code, just tailed) cannot be driven — the daemon has no handle to their terminal. So two-way control requires starting sessions through orc; observed sessions stay read-only with a clear "start with orc run" reply.What it covers
run_telegram_bot.py:55,service.py:60)host_commanddownstream channel + the fully-builtPtySession.send_keyssafety gate + the connectorPromptapproval patternorc run(PTY launch) → inject pipeline → approval-first gatingNext
Review the spec; on approval I'll implement phase by phase (one PR each), starting with Phase 1 (Telegram inbound + reverse lookup). No code written yet — this is the gated plan.
Spec file:
tasks/specs/reverse-input-path.md