Prompt ingestion
The REPL and input processor turn free-form user actions into structured runtime work.
src/screens/REPL.tsxsrc/utils/processUserInput/processUserInput.ts
Execution Flows
These flow maps help you understand Claude Code as a running system rather than a pile of files.
Diagram views
How one user turn moves through REPL, query, tools, and storage.
Source anchors
The REPL and input processor turn free-form user actions into structured runtime work.
src/screens/REPL.tsxsrc/utils/processUserInput/processUserInput.tsThe query loop coordinates model streaming, tool emission, and transcript updates.
src/query.tssrc/QueryEngine.tsTranscript durability is a visible part of the normal turn lifecycle.
src/utils/sessionStorage.tsWhy this flow matters
The standard path for understanding how Claude Code works at runtime.
This flow connects REPL, input normalization, query orchestration, persistence, and rendering.
The UI gathers prompt text, attachments, and queued command metadata.
src/screens/REPL.tsxsrc/components/PromptInput/Plain text, slash commands, and attachments go through one normalization layer.
src/utils/processUserInput/processUserInput.tsThe runtime streams model output, reacts to tool blocks, and manages retries or compaction.
src/query.tssrc/QueryEngine.tsSession storage keeps transcript durability and resume compatibility.
src/utils/sessionStorage.tsThe UI updates incrementally instead of waiting for the whole turn.
src/screens/REPL.tsxsrc/cli/print.ts