pub async fn run(script: String) -> Result<i32>Expand description
Run the CLI’s whole script for the Bash call it belongs to, streaming it
exactly as exec streams a command. The call is the record the hook left
for this session’s command. A script that can’t be linked to a call (a
claude run by hand or nested inside an agent, whose session has no
records, or the CLI’s own shell calls) runs as plain bash, as if there
were no prefix: no live output, nothing else changed.
docs/specs/SPEC_BASH_STREAMING_VIA_SHELL_PREFIX_2026_10_10.md §2.2, §2.3.