agent-ops-patterns / gallery / Cline map / how it decides

How Cline decides

In an ordinary Cline session, plain code runs the work and sets its limits, and the AI model decides when the task is done. By default the model also writes the summary that replaces older history, and in command-line plan mode it decides when to start acting on the plan.

From cline/cline at source version d800bf82, mapped 2026-10-19. Each answer links the code where that decision is made.

How it decides it is done

Limits and memory

Other judgments

Three problems in the code

  1. 1. Shell commands are cut off at 30 seconds

    On the command line, a shell command the agent runs is stopped after 30 seconds by default and the agent is told it timed out, so a long build, test run or install can be stopped partway. Cline's tracker has two open reports about this limit.

    Already tracked upstream (#10549), checked 2026-10-28.

    Where: bash.ts:1138, definitions.ts:515. How we checked: the code was re-read at the source version named above; the sentences were checked by an independent AI reviewer from another company (OpenAI Codex, read-only) in two rounds on 2026-10-28.

  2. 2. A file edit that timed out can still be written

    File edits are given a time limit, but reaching it only tells the model the edit failed; the edit itself is not stopped. So the model can be told an edit timed out while the change still lands in the file.

    Not reported upstream, checked 2026-10-28.

    Where: definitions.ts:745-749, editor.ts:230-267. How we checked: the code was re-read at the source version named above; the sentences were checked by an independent AI reviewer from another company (OpenAI Codex, read-only) in two rounds on 2026-10-28.

  3. 3. A cut-off summary is used as if it were complete

    When the history is shortened, the model's summary replaces the older messages. If the summary was cut off before the model finished it, code still puts it in place; only an empty summary is skipped.

    Already tracked upstream (#14732), checked 2026-10-28.

    Where: agentic-compaction.ts:258-278. How we checked: the code was re-read at the source version named above; the sentences were checked by an independent AI reviewer from another company (OpenAI Codex, read-only) in two rounds on 2026-10-28.

See the full map →

This card was taken from the published cut-down map of Cline at one commit and covers only decisions shown there; it did not look at Cline's hosted services or at code outside the map's folders, and no Cline code was run to make it.

Map: cut-down edition (2026-10-23) · taken from the full map · card data: gallery/cards/cline.json. Found something wrong? Use the correction form.