Cline explained: one coding agent across several interfaces
Build a Cline NDJSON review ledger without executing agent suggestions
A learning project separates streamed events, tool actions and verified repository outcomes.
What you will learn
- Begin with synthetic events
- Test malformed and incomplete output
- Add a bounded integration later
Before you start
- Basic terminal and Git knowledge
- Disposable repository without secrets
A learning project separates streamed events, tool actions and verified repository outcomes.
Key takeaways
- The ledger is a proposed extension.
- Readable events do not prove completion.
- Agent text must remain data.
Begin with synthetic events
Build a local reader that consumes one JSON object per line and displays session ID, event type and redacted text. Use invented events first; the exercise does not require a model account or permission to edit a repository.
This is a proposed application around the documented NDJSON mode, not a feature claimed from the inspected CLI. Keep its event mapping versioned because a stream contract may change between releases.
Test malformed and incomplete output
Include an invalid JSON line, an unknown event type, a duplicate event and a stream that ends without completion evidence. Preserve a diagnostic record rather than silently treating every readable line as successful work.
Do not execute command strings found in event text. Separate an assistant’s reported success from tool exit status and from your own acceptance-test result. These evidence sources can disagree.
Add a bounded integration later
After the parser tests pass, capture a supervised sample run under a known version and redact it for regression fixtures. Confirm the installed NDJSON fields before connecting the ledger to real events.
The first deliverable should show an interrupted session as incomplete, even when its last message sounds confident. Live provider integration, background-session tracking and deployment remain separate follow-up work.
Decision guide
| Criterion | Option A | Option B |
|---|---|---|
| Best when | You need predictable behavior and easy auditing | You need adaptive optimization and have reliable telemetry |
| Main risk | May leave performance on the table | Can become difficult to explain or debug |
Implementation steps
- 1
Parse synthetic lines without executing content.
- 2
Test malformed, duplicate and interrupted streams.
- 3
Keep acceptance-test evidence separate.
Copy-ready example
{"session":"fixture-1","reported":"done","test_status":"unknown","verified_complete":false}Frequently asked questions
Does the exercise require live credentials?
No. Start with synthetic NDJSON fixtures.
What is the main acceptance case?
An interrupted stream remains incomplete despite a success-sounding message.
Sources
- Cline / apps/cli/README.mdSource checked 2026-09-23
- Cline / apps/cli/src/main.tsSource checked 2026-09-23