@prismshadow/penguin-cli · packages/cli/src/commands/input.ts:1

penguin input

cli-command

penguin session input — send a message into an existing session, or poll its last answer.

Registered via packages/cli/src/commands.

Subcommands (1)

penguin input input [sessionId]

Options (6)

--server <url>

penguin input input

--json

penguin input input

--agent-id <id>

penguin input input

--project-id <id>

penguin input input

--timeout <duration>

penguin input input

-m, --message <text>

penguin input input

Source Doc

penguin session input — send a message into an existing session, or poll its last answer.

penguin session input [session_id] [-m ] [--timeout ] [--project-id ] [--agent-id ] [--json] [--server ]

[session_id] accepts a full id or a unique fragment (e.g. the 8-hex tail penguin session ls prints); omitted, it is the agent's most recent session (announced as a dim [latest] line on stderr — see resolveSessionTarget), which makes bare penguin session input the answer to "what did my agent last say".

With -m: a running session gets the text as steering (POST /steer, delivered between turns); an idle one gets a new task (POST /tasks). The default waits and renders the stream until the turn completes; --timeout bounds the wait with soft-yield semantics — on expiry the command detaches (exit 0, the task keeps running server-side) instead of erroring. --timeout 0 is the degenerate window: return immediately after delivery — the one timeout knob covers "don't wait" too.

Without -m: poll — print the session's most recent complete assistant text (an idempotent last-answer snapshot from the messages tail; thinking and tool output are skipped), mirroring input_subagent's empty-prompt semantics. Nothing is queued or steered. A running session is waited on (silently, no rendering) up to the window before the snapshot is taken; still running at expiry prints the current latest text plus the still-running note, exit 0 (--timeout 0 snapshots immediately).

The fragment search scopes to the project (PENGUIN_PROJECT_ID / default_project); a full session id needs no scope. Docs: /docs/cli § "penguin session input".