[FEATURE] A launcher cannot start a session's first turn without it being recorded as a typed human prompt

Status Open
Reported on v2.1.286
Maintainer reply None cached
Activity 0 comments · opened Oct 8, 2026

Problem

A launcher that starts an interactive session cannot start its first turn, or give it a startup text, without that text being recorded as typed by the human.

Observed on 2.1.286 (transcript records): claude "<startup text>" writes a user record with origin: {"kind": "human"} and promptSource: "typed", identical to a message the person typed. The same holds for a line typed into the terminal by a supervisor script. I did not re-measure this on 2.1.294; the binary still has the same promptSource machinery, and I found no option to set it. Alternatives:

  • asyncRewake on a command hook does wake an idle session, but the wake shows as "Stop hook blocking error", and it needs a session already running;
  • cross-session SendMessage needs a running session and a model turn on the sender side (see #99049).

So there is no way for a launcher to say "this prompt came from a script", and no way to start the first turn of an interactive session without a user message.

Request

  • An option such as claude --initial-prompt-origin system|hook|launcher "<text>" so the first user record carries a non-human origin / promptSource, and
  • a way for a SessionStart hook to start the first turn (a "startTurn": "<text>" output field) without a user message.

Why

Records, hooks and agents that consume the transcript treat origin: human as an instruction from the person. When a launcher's text is recorded as theirs, it cannot be told from what the person actually said (the same distinction #94675 asks for on the UserPromptSubmit payload).

Environment

Claude Code 2.1.286 (measured) and 2.1.294, Linux (Bazzite, Fedora atomic), interactive terminal sessions.

---
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
🤖 Generated with Claude Code

View original on GitHub ↗