Skip to content
pi-c View Ticket
Login

View Ticket

Remote: a phone prompt naming a skill or prompt template reaches the model unexpanded

Closed89dea7821e3e4476a90a50489fa193fa611416d3Created 3.0 days agoUpdated 2.8 days ago
Description2026-11-28 00:29:10
Reported from real use: slash commands do not work from the phone.

pic-relay is changing the page side: the phone now runs its own control for /model, /thinking, /compact, /name, /new, /permissions and /auth, and says that the terminal's other commands run only at the computer. Skills and prompt templates are pic's to expand, and a phone prompt that names one reaches the model unexpanded.

Reproduce on a disposable home and workspace, with a scripted OpenAI-compatible endpoint and no live service: 1. Copy one skill to `$H/.pic/skills/bellard/SKILL.md`. 2. Start a conversation from the phone and send `/skill:bellard check this`. 3. The model receives the user message `/skill:bellard check this` as typed. 4. `HOME=$H pic --model scripted/scripted-1 ask "/skill:bellard check this"` in the same workspace sends `<skill name="bellard" location=...>`, the expanded skill. get_commands on the same home lists `skill:bellard`, so the phone is told the command exists.

Observed: from the phone the text is sent as typed. Expected: the same expansion as `pic ask` and the terminal, for skills and prompt templates (Pi's prompt expands both).

Code path: remote.c `rmt_prompt` (line ~4400) and `rmt_fresh` (`+W`, line ~4443) pass the message to `rmt_start`, which keeps it verbatim (`c->text = strdup(text)`) for the detached run. main.c `ask()` expands `/skill:` through `pic_skills_expand` (line ~2989), and `expand_template` (line ~2333) covers templates for steering and follow-ups. The remote run path calls neither. I tested skills only; templates take the same path.

Fix shape: expand in the run the remote starts, as `ask()` does (skill first, else template), and in the inbox path for steer and follow_up through `expand_template`. A skill that is gone should get Pi's error back on the command, not be sent as text.

2026-11-28 05:18:41

Closed by !208: remote-fixes landing on trunk (778886bba32a)