Affected area
Android app
What happened?
Observed:
- With "Share phone status with agent" enabled, the app's "Injected context" audit sheet shows the phone-status block ("The user is chatting via the Hermes-Relay Android app. Keep responses mobile-friendly and concise when possible." plus battery level) under the caption "Context sent with next message".
- On the default gateway chat transport (dashboard
/api/ws), the block is never actually sent: the agent's system context for the turn contains no phone-status preamble, no "Hermes-Relay Android app" line, and no battery value. The agent only receives the server-side plugin blocks (e.g. hermes-relay.media-sensitivity).
Expected:
- Either the block is delivered on every transport the app uses, or the audit sheet reflects what each transport actually sends (or marks the block as unsupported on the gateway transport).
Reproduction steps
- Pair the app (Google Play build) with a self-hosted hermes-agent gateway.
- Settings → enable "Share phone status with agent" (master toggle ON).
- Open the "Injected context" audit sheet — the Phone status block is listed as "Context sent with next message".
- Send a chat message (default gateway transport).
- Inspect the agent's system context for the turn — the phone-status block is absent.
Environment
- Hermes-Relay version/tag: Android app 1.15.1 (54) (Google Play); relay plugin v1.11.1
- Install surface: Google Play
- Android device and OS: realme 11 Pro 5G (RMX3771), Android 15
- hermes-agent version or commit: v0.21.0 (2026.8.31), upstream 22c5684b
- Connection mode: Tailscale (self-hosted)
Sanitized logs, screenshots, or traces
- Audit sheet screenshot shows the block under "Context sent with next message" (attached).
- Agent-side:
agent.turn_context logs the session with platform=webui; no phone-status text appears in any turn context. Gateway WS log shows the session arriving via tui_gateway.ws from the phone's tailnet IP.
Upstream or standard-path notes
Root cause appears to be the app's transport split in ChatViewModel.kt:
- SSE paths (
runs, completions, sessions/{id}/chat/stream) send systemMessage = systemMsg (which includes the phone-status block) — upstream accepts it as ephemeral_system_prompt.
- The gateway path (
gateway.sendTurn(...)) sends bare text with no system-message slot; a code comment states: "The gateway carries NO phone-context preamble: prompt.submit is bare text with no system-message slot... Phone context rides the SSE systemMessage (invisible) + the on-demand android_phone_status tool instead."
- So the block is silently dropped on the default transport while the UI claims it is sent.
Checklist
Related: See #557 — the feature request for a reliable channel marker; this bug is one concrete manifestation of that gap.
Affected area
Android app
What happened?
Observed:
/api/ws), the block is never actually sent: the agent's system context for the turn contains no phone-status preamble, no "Hermes-Relay Android app" line, and no battery value. The agent only receives the server-side plugin blocks (e.g.hermes-relay.media-sensitivity).Expected:
Reproduction steps
Environment
Sanitized logs, screenshots, or traces
agent.turn_contextlogs the session withplatform=webui; no phone-status text appears in any turn context. Gateway WS log shows the session arriving viatui_gateway.wsfrom the phone's tailnet IP.Upstream or standard-path notes
Root cause appears to be the app's transport split in
ChatViewModel.kt:runs,completions,sessions/{id}/chat/stream) sendsystemMessage = systemMsg(which includes the phone-status block) — upstream accepts it asephemeral_system_prompt.gateway.sendTurn(...)) sends bare text with no system-message slot; a code comment states: "The gateway carries NO phone-context preamble: prompt.submit is bare text with no system-message slot... Phone context rides the SSE systemMessage (invisible) + the on-demand android_phone_status tool instead."Checklist
Related: See #557 — the feature request for a reliable channel marker; this bug is one concrete manifestation of that gap.