Skip to content

docs(spec): reverse path — Telegram → live session input (orc run + PTY) - #24

Merged
Pher217 merged 1 commit into
mainfrom
claude/2026-06-07-spec-reverse-input
Jun 7, 2026
Merged

docs(spec): reverse path — Telegram → live session input (orc run + PTY)#24
Pher217 merged 1 commit into
mainfrom
claude/2026-06-07-spec-reverse-input

Conversation

@Pher217

@Pher217 Pher217 commented Jun 7, 2026

Copy link
Copy Markdown
Owner

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

  • Exact trace of where a topic reply dies today (run_telegram_bot.py:55, service.py:60)
  • What to reuse: the already-wired host_command downstream channel + the fully-built PtySession.send_keys safety gate + the connector Prompt approval pattern
  • 5 phased PRs: inbound routing + reverse lookup → bidirectional daemon (recv loop) → orc run (PTY launch) → inject pipeline → approval-first gating
  • Security core: approval on every keystroke (v1), from-user auth, topic scoping, update_id dedup
  • Implementation map with file:line anchors

Next

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

…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.
@Pher217
Pher217 merged commit 0da5c3a into main Jun 7, 2026
1 check passed
@Pher217
Pher217 deleted the claude/2026-06-07-spec-reverse-input branch June 7, 2026 17:43
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