One turn through Cline
architecture node:
User input:
Representation at this boundary
Source modules
Loop map
One pass — webview → host → SDK → provider → tools → feedback. The loop is host-independent; the VS Code host only supplies tool executors, policy, and the approval callback.
Approval round-trip — when a tool call needs approval, the policy gate pauses execution, the webview asks (diff preview for edits), and the user's decision resumes at step 8 — or comes back as a denial tool error.
Outer turn loop — after step 9 the transcript renders in the webview; each turn is stash-checkpointed (undoable via
/undo); the next user message re-enters at step 1.