announcing twig: an agentic code editor that understands your users
January 2026

At PostHog, we've spent years building tools that help teams understand their users. Product analytics, session recordings, feature flags, A/B testing - all designed to answer one fundamental question: what do your users actually do?
Then we looked at how software gets built, and something struck us as deeply wrong.
code editors are stupid
Not in the "they lack AI" sense. The latest generation of AI-powered editors are remarkably capable at writing code. They can refactor, generate tests, explain complex logic, and autocomplete with frightening accuracy.
But they're stupid in a more fundamental way: they have no idea how anyone uses the product they're building.
Think about it. Your editor knows everything about your codebase - every function, every type, every dependency. But it knows nothing about the human beings who will actually use what you're building. It can't tell you that 40% of users drop off at the signup form. It doesn't know that your checkout flow has a rage-click problem. It has no clue that your most valuable users never touch the feature you spent three months building.
the realization
We realized that all of PostHog's products - analytics, session replay, experiments, surveys - should be used by agents, not just humans. The data we collect about user behavior shouldn't just inform human decisions. It should directly drive what gets built.
What if your development environment could watch users struggle with a confusing interface and automatically propose fixes? What if it could detect errors in production, understand their impact, and generate pull requests to fix them while you sleep? What if it could run experiments, measure results, and iterate - all without you having to context-switch away from the problems that actually need human creativity?
product autonomy
We call this vision "product autonomy." Not autonomous products that replace human judgment - but products that can take care of themselves. Products that detect their own issues, fix their own bugs, and continuously improve based on real user behavior.
Twig is our attempt to make this real. It's an agentic development environment that connects to your PostHog data (and soon, other analytics tools) to understand how your product is actually used. It watches session recordings to spot UX problems. It monitors errors and their user impact. It generates fixes, creates PRs, and runs experiments - automatically.
The best code editors will soon be the ones that understand not just your code, but your users. We're building that future.
- the twig team