{"schema_version":"newruntime-agent-readable-v0.2","type":"post","stable_id":"post:cline-hooks-agent-harness-guardrails","slug":"cline-hooks-agent-harness-guardrails","title":"Cline Hooks Put Deterministic Rules Inside The Agent Loop","description":"Cline's plugin hooks show how an agent harness can journal every run and block dangerous tool calls without waiting for the model to choose a guardrail.","retrieval_nugget":"Cline's plugin hooks show how an agent harness can journal every run and block dangerous tool calls without waiting for the model to choose a guardrail. An MCP server exposes tools that a model may choose to call. A harness plugin solves a different problem: its hooks run automatically at defined points in the loop.","status":"published","published_at":"2026-08-03","updated_at":"2026-08-03","record_date":"2026-08-03","date_kind":"published_at","topics":["agent-harnesses","coding-agents","mcp","observability"],"source_urls":["https://cline.bot/blog/extend-cline-with-plugins-and-hooks"],"visuals":[{"id":"cline-hooks-agent-harness-guardrails","kind":"editorial-diagram","role":"hero","src":"https://newruntime.com/images/posts/cline-hooks-agent-harness-guardrails.webp","alt":"Hand-drawn agent loop with fixed hook points before and after runs, model calls, and tool calls, including a journal path and a deterministic block gate before a destructive command executes.","caption":"MCP expands the tools an agent may choose; harness hooks run automatically at fixed lifecycle boundaries.","credit":"New Runtime synthesis from Cline","source_url":"https://cline.bot/blog/extend-cline-with-plugins-and-hooks","generated_with":"gemini-3.1-flash-image","width":1600,"height":900,"legend":[{"label":"Observe","description":"Run and tool hooks can record status, duration, iterations, token use, and cost."},{"label":"Block","description":"A before-tool hook can reject a destructive operation before execution."},{"label":"Rewrite","description":"Model and tool boundaries can redact input or transform returned results."},{"label":"Reuse","description":"One plugin can attach to CLI, editor, and SDK versions of the same harness."}]}],"routes":{"html":"https://newruntime.com/posts/cline-hooks-agent-harness-guardrails/","markdown":"https://newruntime.com/posts/cline-hooks-agent-harness-guardrails.md","json":"https://newruntime.com/posts/cline-hooks-agent-harness-guardrails.json"},"source_format":"markdown","next_reads":[{"type":"topic","path":"/topics/coding-agents/","reason":"Explore the coding agents topic hub.","url":"https://newruntime.com/topics/coding-agents/","title":"Coding agents - New Runtime","media_type":"text/html"},{"type":"topic","path":"/topics/mcp/","reason":"Explore the mcp topic hub.","url":"https://newruntime.com/topics/mcp/","title":"MCP - New Runtime","media_type":"text/html"},{"type":"related_material","path":"/posts/agentic-sdlc-software-factory-loop/","reason":"Shares agent harnesses and coding agents.","url":"https://newruntime.com/posts/agentic-sdlc-software-factory-loop/","title":"A Software Factory Connects Agents Through Verified Outcomes","media_type":"text/html"},{"type":"related_material","path":"/posts/claude-code-auto-mode-action-gate/","reason":"Shares agent harnesses and coding agents.","url":"https://newruntime.com/posts/claude-code-auto-mode-action-gate/","title":"Claude Code Auto Mode Gates Actions Instead Of Explanations","media_type":"text/html"},{"type":"related_material","path":"/posts/anthropic-tool-search-programmatic-calls/","reason":"Shares agent harnesses and mcp.","url":"https://newruntime.com/posts/anthropic-tool-search-programmatic-calls/","title":"Anthropic Moves Large Tool Libraries Out Of Context","media_type":"text/html"}]}
