Skip to content
pi-c Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: b266dddac62f07c47efd61f6c70d360f3ee4c11044fcaed0fa78388acd99002a
Ticket: 89dea7821e3e4476a90a50489fa193fa611416d3
Remote: a phone prompt naming a skill or prompt template reaches the model unexpanded
User & Date: dmestas on 2026-11-28 00:29:10
Changes

  1. comment changed to:
    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.
    
  2. foundin changed to: "2f9e8c02576f"
  3. severity changed to: "Important"
  4. status changed to: "Open"
  5. title changed to:
    Remote: a phone prompt naming a skill or prompt template reaches the model unexpanded
    
  6. type changed to: "Code_Defect"