AI coding agents are good at writing code, but they have a memory problem. The longer a session runs, the more context they lose - earlier instructions fade, architectural decisions get forgotten, and the agent starts contradicting itself. Developers call this context decay, and a new VS Code extension tackles it with an old Git feature.
VS Code Agent Kanban structures AI agent work into a plan-to-do-implement flow using markdown files, then isolates each task in its own git worktree. A worktree is essentially a separate working copy of your repository that shares the same Git history - so an agent can work on one task without polluting the files another task depends on.
The key insight: instead of letting an agent hold everything in its conversation window (which has a hard token limit and degrades over time), you formalize the plan as markdown files in the repo itself. The agent reads its instructions from those files at the start of each task, works in an isolated worktree, and the results get merged back via normal Git flows.
This approach trades conversation memory for file-based state. The agent doesn't need to "remember" what it decided three hours ago because the decision is written down in a markdown file it can re-read. Each worktree acts as a clean room where one task gets done without side effects leaking into other work.
The technique applies to any AI coding tool that supports VS Code, whether that's Copilot, Cursor's agent mode, Claude Code, or Cody. It's a workflow pattern more than a product - the extension just automates what some developers were already doing manually with Git worktrees and markdown task files.