openclaw - 💡(How to fix) Fix Live session: expose stream-json user-message injection from external processes (e.g. UDS) for orchestrator wake delivery

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Root Cause

The current fallback writes a durable wake-inbox record, but live delivery through openclaw agent --message can hang because it does not reuse the active Claude stream-json child that owns the TUI turn.

Fix Action

Fix / Workaround

Smith Crafts dispatches long-running Codex work outside the active OpenClaw TUI session. When a dispatch reaches a terminal state, the orchestrator needs to wake the long-running Titus TUI session with a user-side message so the operator can T-B-V the completed work without polling a file or launching a second agent process.

Interim local patch

We are applying a content-anchored local dist patch that adds this socket path for Titus wake delivery, and registering it in our local OpenClaw managed-update reapply hook so updates do not silently remove the behavior. The local patch is intentionally small and reuses the existing serializer and live-session registry.

Code Example

injectUserMessage(sessionKey: string, content: Array<{ type: "text"; text: string }>): Promise<{
  accepted: boolean;
  delivered: boolean;
  reason?: string;
}>
RAW_BUFFERClick to expand / collapse

Use case

Smith Crafts dispatches long-running Codex work outside the active OpenClaw TUI session. When a dispatch reaches a terminal state, the orchestrator needs to wake the long-running Titus TUI session with a user-side message so the operator can T-B-V the completed work without polling a file or launching a second agent process.

The current fallback writes a durable wake-inbox record, but live delivery through openclaw agent --message can hang because it does not reuse the active Claude stream-json child that owns the TUI turn.

Relevant local code path

The live-session runtime already has the pieces needed for a clean injection surface:

  • the module-level liveSessions map tracks active Claude live sessions;
  • createClaudeUserInputMessage(content) serializes user input in the same stream-json dialect used by the live child;
  • the live turn path writes that serialized packet to session.managedRun.stdin.write(...).

This means an orchestrator wake can be delivered safely if it resolves the active session at request time and reuses the existing serializer instead of inventing another stdin dialect.

Proposed API

Please consider exposing a supported live-session injection API, for example:

injectUserMessage(sessionKey: string, content: Array<{ type: "text"; text: string }>): Promise<{
  accepted: boolean;
  delivered: boolean;
  reason?: string;
}>

An optional, explicitly enabled local Unix-domain socket listener could sit on top of that API for same-machine orchestrators:

  • one newline-delimited JSON request per connection;
  • resolve the active session from liveSessions at delivery time;
  • serialize with the same createClaudeUserInputMessage helper;
  • write to the current managedRun.stdin;
  • ACK delivered, unavailable, invalid payload, or already-consumed states.

For replay safety, the caller can keep a durable wake-inbox file and the listener can mark it consumed only after stdin write succeeds.

Interim local patch

We are applying a content-anchored local dist patch that adds this socket path for Titus wake delivery, and registering it in our local OpenClaw managed-update reapply hook so updates do not silently remove the behavior. The local patch is intentionally small and reuses the existing serializer and live-session registry.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Live session: expose stream-json user-message injection from external processes (e.g. UDS) for orchestrator wake delivery