惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

有赞技术团队
有赞技术团队
美团技术团队
博客园 - 司徒正美
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
阮一峰的网络日志
阮一峰的网络日志
S
SegmentFault 最新的问题
博客园_首页
雷峰网
雷峰网
V
V2EX
The Cloudflare Blog
博客园 - 三生石上(FineUI控件)
量子位
Last Week in AI
Last Week in AI
人人都是产品经理
人人都是产品经理
爱范儿
爱范儿
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 聂微东
V
Visual Studio Blog
Hugging Face - Blog
Hugging Face - Blog
博客园 - 【当耐特】
Jina AI
Jina AI
月光博客
月光博客
L
LangChain Blog

Artificial Intelligence in Plain English - Medium

OpenAI launched GPT-5.5 - it’s the death of digital hand-holding The Future of Agentic AI is Not One Genius Model, it is a Team How AI Development Optimizes Smart Parking Management Systems The FAST Framework: A Practical Responsible AI Checklist for Data Scientists Why is Cloud Migration Consulting Important for Businesses? My Team Caught Me Using AI to Merge PRs. The Code Was Fine. The Trust Wasn’t. SQL Tricks Every Data Scientist Should Know I Stopped Chasing AI Hype and Started Building Systems That Actually Worked GPT-5.5: The Model That Thinks Ahead Mastering AI Storytelling: Crafting Prompts for Captivating Narratives Why So Many Businesses Are Switching to Clawdbot for AI Automation The Growing Dependence on AI Tools — And Why It’s Risky How to Cut Claude Code Costs by At least 2 to 3x How The Google Antigravity Agent Hallucinated NSFW Adult Websites? “Vercel Hack Exposed: How a Simple AI Tool Led to a $2M Data Breach” The Vercel Hack: How One AI Tool Cracked Open the Internet’s Deployment Stack AI Chatbot Development Services for Enterprise Data-Sensitive Processes What AI Agent Developers Should Consider When Designing Agents for High-volume Environments My ChatGPT Responds Better Than Yours, Here is the 3-Step Guide How To Create A Custom AI Chatbot, Train & Deploy It In 48 Hrs Learning in the Age of Intelligent Systems: Why Human Understanding Still Matters Everyone Is Learning AI, So Why Will Most Still Fail? AI Is Learning Faster Than You Think What If Your Next Best Friend Is a Robot That Even Feels Real? OpenAI Quietly Broke the Way You Build AI Apps The AI Superpower Standoff: Why the OpenAI vs. Anthropic War Looks Exactly Like the US vs. Iran The LLM Tools That Actually Matter in Production (Not LangChain, Not the OpenAI SDK) The Most Dangerous Use of Artificial Intelligence Yet! | AI Porn Why Your AI Chatbot Gives Vague Answers (And Why That Should Matter to You) How Do You Prove You’re You, After AI Has Evolved?
We Started Running AI Agents on Our Codebase. Here’s the ...
Amrit Pal Si · 2026-04-27 · via Artificial Intelligence in Plain English - Medium
We started integrating AI coding agents into our day-to-day engineering workflow a few months back. The setup was straightforward — agents running on the same repo as the team, picking up tasks, generating code. It worked until it didn’t. Photo by Adarsh Kummur on Unsplash The problem was branches. An agent would check out a branch to work on a task. A developer on the team would pull the repo, make changes, and push. The agent, still mid-task on a stale state of the same branch, would generate code against a base that no longer existed. We lost a few hours to this before we stopped calling it bad luck and started looking for a fix. Git worktrees are what we landed on. What a Worktree Actually Is Most developers work on one checkout of a repository at a time. When you need to switch context, you stash or commit and then check out a different branch. A git worktree gives you a second checkout — a separate working directory on disk, linked to the same repository, locked to its own branch. Your agent works in its worktree. You work in yours. Same repo, same history, no collisions. # Create a worktree for the agent to work in git worktree add ../my-project-agent-workspace agent/task-refactor-auth That command creates a new directory at ../my-project-agent-workspace, checked out to a new branch called agent/task-refactor-auth. The agent does its work there. You stay in the main working directory on your branch. The Setup We Use We keep a consistent naming convention. Agent worktrees go into a sibling directory with a -agent suffix, and branches follow the agent/ prefix pattern. # From your main project directory git worktree add ../my-project-agent agent/$(date +%Y%m%d)-task-name The date prefix in the branch name keeps things ordered when you have more than one agent task running in parallel. We found that without it, worktree directories pile up with generic names, and it becomes unclear what’s active. When the agent finishes its task, you review the diff, merge or cherry-pick what you want, and clean up: git worktree remove ../my-project-agent git branch -d agent/20260422-task-name The main repo stays clean. No leftover branches, no orphaned directories. The Configuration Mistake That Will Cost You a Morning The mistake we made — and that most teams make — is not isolating dependency directories between the main working directory and the worktree. If your project has a node_modules, a vendor directory, or compiled assets that live at the project root, both your main checkout and the agent's worktree will reference the same physical directory on disk. An agent that runs a package install, a bundle install, or a build step inside its worktree will modify those shared directories. You will come back to your environment and find your dependencies in an unexpected state. The fix is to configure your tooling to write dependencies into the worktree’s own directory, not a shared location. For most package managers, this means setting an explicit install path: # Node — tell npm to install into the worktree's own node_modules cd ../my-project-agent npm install --prefix . ​ # Ruby — tell Bundler to use a local vendor path bundle install --path vendor/bundle Alternatively, keep agent tasks to code generation only — no install steps, no build steps. That constraint is often reasonable and avoids the problem entirely. Cleaning Up After Worktrees don’t clean themselves up automatically. It is easy to end up with a dozen stale worktree directories after a few weeks of regular agent use. We added a small shell alias to list active worktrees: alias wt-list="git worktree list" And a cleanup habit: at the end of each week, run git worktree list, remove anything that's been merged or abandoned, and delete the associated branches. Ours was not a complicated problem once we understood what was causing it. Agents are just another developer on the codebase. Give them their own desk, and they stay out of the way. We Started Running AI Agents on Our Codebase. Here’s the Git Setup That Kept Things Sane. was originally published in Artificial Intelligence in Plain English on Medium, where people are continuing the conversation by highlighting and responding to this story.