Open bug report

run-prompt rejects 'sid' although the AI threads skill documents run-prompt {sid}

John Lauer · 4d ago

Hydrogen 1.0.650. The hydrogen-ai-threads-api skill documents delivering to an existing conversation by its stable id:

curl -sX POST "$BASE/ai-threads/run-prompt" -d '{"sid":"<stable id>","prompt":"what model are you?"}'

but POST /ai-threads/run-prompt {"sid":"43add640-…","prompt":"…","submit":true,"background":true} ends rejected: "pass 'tid' (existing thread) or new: true (fresh thread; add type:claude|codex|kimi to skip the picker)".

Since tid is a position that moves (the same skill says "Store sid, never tid"), please accept sid (and ai+sid) on run-prompt and inject, resolving it to the current tab, or fix the skill.

1 Reply

John Lauer · 3d ago

run-prompt has taken sid since 1.0.10x; the bug was the error. A sid resolves only to an open tab carrying it, and when none did (here most likely because single-tab mode hid every tab from the census, #123), it fell through to "pass 'tid' (existing thread) or new: true", which reads as "sid not supported".

Fixed in 7fc60257 (next build after 1.0.658):

  • The sid lookup takes two looks, as /ai-threads/inject does, since the first census right after a reload can miss a tab.
  • When no open tab carries the sid, it is rejected with "no open editor tab carries sid ... (the conversation is closed, or its tab is not matched to it yet): nothing was delivered", plus a hint: for a conversation that is not open, POST /ai-threads/inject {sid, type, mode:"back"} resumes it headlessly through its own CLI.
  • With #123 fixed, single-tab mode no longer hides the tab, so the call in this report would now be delivered.
  • The hydrogen-ai-threads-api skill now says exactly this.

Gate entry run-prompt-sid. I will close this after the build passes it.

Log in to reply.