{"slug": "claude-code-managing-multi-repo-workspaces", "title": "Claude Code: Managing Multi-Repo Workspaces", "summary": "Developer RiccardoCereghino built facet, a Go CLI tool that creates disposable, terminal-based workspaces for LLM agents like Claude Code to manage multi-repo projects. The tool spawns a workspace from a GitHub issue, clones required repositories, writes a CLAUDE.md for context injection, tracks the issue as \"In progress,\" and deletes the entire workspace after the PR is merged. Cereghino learned to avoid session managers like zellij and always require human confirmation for AI-inferred repository scope.", "body_md": "# Claude Code: Managing Multi-Repo Workspaces\n\nTo solve this, I built a tool called facet. The core idea is to create disposable, terminal-based workspaces similar to VS Code workspaces, but designed specifically for LLM agents.\n\n## The Workspace Architecture\n\nA facet workspace is a directory containing checkouts of one or more repositories defined by a manifest. The workflow follows a strict lifecycle:\n\n1. **Initialization:** You spawn a workspace from a GitHub issue.\n\n2. **Context Injection:** The tool identifies the required repos, clones them, and writes a `CLAUDE.md`\n\nfile based on the issue body. This ensures the agent has immediate context without manual prompting.\n\n3. **Tracking:** The issue is automatically moved to \"In progress\" on the project board.\n\n4. **Cleanup:** Once the PR is merged, the entire workspace is deleted.\n\n## Technical Implementation & Lessons\n\nI initially tried to integrate zellij for session management, but it was a disaster. I ended up with nameless [Claude](/en/tags/claude/) sessions and no way to reattach after crashes, resulting in lost work and 1,500 lines of deleted code. I learned that the integration needs to be leaner and more explicit.\n\nOne specific challenge was determining which repositories were \"in scope\" for a given issue. I found that GitHub labels are too ambiguous for this. Instead, facet infers the repo set from form fields and cross-references, but it always presents this guess for manual confirmation. Never trust the AI's inference silently; always require a human check.\n\nThe tool is a small Go CLI, and interestingly, much of the hardening was done by Claude Code agents themselves. I fed them the issue backlog, they wrote the fixes, and I merged them. This created a tight feedback loop where the agent helped build the very environment it needed to be productive.\n\nFor those looking for a deep dive into the implementation, the source is available here:\n\n```\nhttps://github.com/RiccardoCereghino/facet\n```\n\n[Next MCP Security: What to Check in Your mcp.json →](/en/threads/3211/)", "url": "https://wpnews.pro/news/claude-code-managing-multi-repo-workspaces", "canonical_source": "https://promptcube3.com/en/threads/3217/", "published_at": "2026-07-25 14:01:16+00:00", "updated_at": "2026-07-25 14:06:20.253886+00:00", "lang": "en", "topics": ["developer-tools", "ai-agents", "ai-tools"], "entities": ["RiccardoCereghino", "facet", "Claude Code", "GitHub"], "alternates": {"html": "https://wpnews.pro/news/claude-code-managing-multi-repo-workspaces", "markdown": "https://wpnews.pro/news/claude-code-managing-multi-repo-workspaces.md", "text": "https://wpnews.pro/news/claude-code-managing-multi-repo-workspaces.txt", "jsonld": "https://wpnews.pro/news/claude-code-managing-multi-repo-workspaces.jsonld"}}