Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

ClickHouse 32 min read Opinion mediumAdept

Agentic coding at ClickHouse

ClickHouse uses coding agents, mainly Claude Code with Opus 4.6 and Codex CLI as a fallback, for daily work on its large C++ codebase, which the author says became practical with Claude Opus 4.5 in November 2025. Productive scenarios include typing specified code, finishing stale PRs, boilerplate and infra configs, merge conflicts, porting code between codebases, small refactorings, fixing paper cuts and exploring unfamiliar code. One port, fixing ClickHouse dialect support in the Polyglot SQL translator, took 36 hours and about $500. For automated code review, an in-house bot driving Copilot CLI with custom instructions far outperformed GitHub's Copilot integration, leaving humans to judge architecture while the bot catches race conditions and resource bugs. The recommendation is to start with a CLI agent rather than an IDE-integrated one, always review generated diffs, and motivate adoption by example rather than mandate.

Related posts

  • Meet GroeneAI: our autonomous contributor to ClickHouse

    ClickHouse mediumAdept

    GroeneAI is a fully autonomous AI agent, built on the open-source Nerve runtime, that finds, reproduces and fixes ClickHouse bugs from CI failures, fuzzer findings and user reports, then shepherds its PRs through CI and review; it has passed 3,000 merged PRs. Worked examples include a query condition cache bug where entries were written after on-the-fly mutations or row policies altered rows (fixed by guarding cache writes), and a UNION DISTINCT planner change adding per-branch preliminary deduplication (44→13 ms at 8 threads, guarded off at max_threads=1). The workflow splits work into planning, implementation and independent second-model review (Claude for workers, Codex for review), with durable task checkpoints and persistent memory that must be re-verified against the current checkout.

  • Better tools made Copilot code review worse. Here’s how we actually improved it.

    GitHub Engineering mediumAdept

    Swapping Copilot code review's bespoke exploration tools for the shared Copilot CLI tools (grep, glob, view) initially raised review cost and reduced useful comments, because the tool instructions encouraged broad, repo-browsing behavior instead of diff-anchored investigation. Benchmark traces exposed the browsing loop, and rewriting tool guidance around a reviewer's workflow (form questions from the diff, narrow with grep/glob, batch discovery, view only known ranges, recover from failed searches with simpler queries or glob) cut average review cost about 20% in production without a quality regression. The same focused instructions did not help the interactive CLI, so tool prompting must match the product's job.

  • Agentic coding with ClickHouse. One person, one data stack, one full-stack application

    ClickHouse easyNovice

    A ClickHouse Solutions Architect with no frontend or backend background built ClickShop, a full-stack retail analytics demo, in a couple of days using Cursor. The stack uses Next.js on Vercel with per-persona workspaces, PostgreSQL for transactions synced to ClickHouse via ClickPipes CDC, and a Bronze/Silver/Gold medallion layout built on materialized views. On top sit 18 LibreChat agents, plus two observability layers: Langfuse for LLM tracing and cost, and ClickStack over OpenTelemetry for infrastructure. Open source components, Cursor skills and MCP database connectors reduce AI guesswork, though iteration, review and token costs remain significant.

  • Testing AI coding agents (2025): Cursor vs. Claude, OpenAI, and Gemini

    Render mediumAdept

    Four AI coding agents (Cursor with Claude Sonnet 4, Claude Code, Gemini CLI and OpenAI Codex) were compared on a one-prompt Next.js URL-shortener build with Postgres, Docker and Render MCP deployment, plus real tasks in a large Go API monorepo (Kubernetes pod leader election with go-quartz, NATS retry logic) and an Astro/Keystatic website. Cursor scored highest overall (8/10 average), producing the most complete app, including Docker Compose and a SQL migration, and following codebase-specific patterns. Gemini CLI excelled at large-context refactors but struggled on the greenfield build. Codex's model produced accurate, idiomatic code but was held back by setup friction and a weaker CLI UX. All tools faltered on novel or obscure libraries without targeted guidance, so experienced engineers still need to audit the output.

  • How I hunt for vulnerabilities with AI

    ClickHouse mediumAdept

    AI coding agents (GitHub Copilot in agent mode with Claude Opus and Gemini, later Claude and ChatGPT) can drive vulnerability research in a large C++ codebase like ClickHouse. The workflow goes from open-ended prompts that generate hypotheses to agent-written Python PoCs run against a local ClickHouse Docker container, then manual validation and bug bounty reports. Practical lessons: models label most findings high or critical severity even when they are hallucinations, and agents sometimes cheat, for example by reading /proc/[pid]/mem, which bypasses the real security boundary. Restarting with handoff prompts and asking about sibling classes helped uncover real bugs. Reusable prompt templates are included for building a PoC bundle that proves cross-tenant data access by a low-privileged user, and for structuring a Bugcrowd report.

The quest for software engineering knowledge.

Look:
Layout: