{"slug": "agentdock-workspace-for-managing-agents-across-repos-and-worktrees", "title": "Agentdock - workspace for managing agents across repos and worktrees", "summary": "Developer Vishal Narkhede open-sourced Agentdock, a web dashboard for managing parallel AI coding agents like Claude Code and Cursor Agent across multiple repositories via tmux sessions with git worktree isolation. The tool, built primarily for Claude Code, offers live terminal streaming, session restore, plan and changes tabs, and mobile-friendly access, aiming to address RAM-heavy Cursor usage and multi-repo workflows.", "body_md": "A web dashboard for managing parallel AI coding agents across multiple repositories. Run [Claude Code](https://docs.anthropic.com/en/docs/claude-code), [Cursor Agent](https://docs.cursor.com/agent), or other agents side-by-side in tmux sessions with git worktree isolation — all from your browser.\n\nCreate sessions, watch live terminal output, type input, switch between agents mid-conversation, and manage everything through a clean web UI or CLI — including from your phone or tablet with a mobile-optimized interface.\n\nI got tired of Cursor eating all my RAM. I'm not a terminal guy. I work on features that span multiple repos simultaneously. And sometimes I just need to keep things moving while walking the baby at 2am.\n\nSo I started building my own setup — a proper web UI for running Claude Code in tmux, with git worktrees for isolation, a live terminal I can actually see from my phone, and enough structure that I can run several parallel workstreams without losing my mind. At some point it became real enough that I decided to open source it.\n\nIf any of that sounds familiar, this is for you. If you're using it and want to chat about where it goes next — [find me on X](https://x.com/vishtree1992).\n\nNote:This is a side project I built to make my own work life easier — not a polished product. Things may not always work perfectly. If you hit a bug or something feels off, just[open an issue]and I'll get to it when I can.\n\n**Claude Code first**— built and optimised for Claude Code; Cursor Agent support exists but is experimental (see[AGENTS.md](/vishalnarkhede/agentdock/blob/main/AGENTS.md)to add your own)**Agent switching**— Switch between agents mid-conversation with context preservation** Git worktrees**— Isolate work with automatic worktree creation per session** Multi-repo sessions**— Work across multiple repositories in a single grouped session** Live terminal**— Stream agent output in real-time via WebSocket + xterm.js** Session restore**— Restore stopped sessions with full conversation history intact** Plan tab**— Agents save structured plans; send follow-up messages directly from the plan view** Changes tab**— Live git diff viewer with inline commenting** Files explorer**— Browse and open files from the session's repo with in-file search (Cmd+F)** Status detection**— Real-time working/waiting/done status via Claude Code hooks** Prompt templates**— Save and reuse common prompts across sessions** Session grouping**— Organize sessions by project or team** Session pinning**— Pin important sessions to the top of the list** Meta-properties**— Attach custom key-value properties to sessions for context** Quick actions**— Fix-me button and Slack-to-fix for one-click session creation from issues** Ngrok integration**— Expose the dashboard over the internet with a single toggle** Keyboard shortcuts**— MRU session switcher, fullscreen terminal, and more** Collapsible sidebar**— Maximize terminal space with one click** Mobile-friendly UI**— Manage agents from your phone or tablet** Browser notifications**— Get notified when agents finish or need input** Password protection**— Optional authentication for network access\n\nNote:agentdock is built primarily for[Claude Code]. Cursor Agent mode exists but is not actively maintained — expect rough edges.\n\n| Tool | Required | Purpose | Install |\n|---|---|---|---|\n|\n\n`curl -fsSL https://bun.sh/install | bash`\n\n[tmux](https://github.com/tmux/tmux)`brew install tmux`\n\n[git](https://git-scm.com/)[Node.js](https://nodejs.org/)`brew install node`\n\n[Claude Code](https://docs.anthropic.com/en/docs/claude-code)`npm install -g @anthropic-ai/claude-code`\n\n[gh CLI](https://cli.github.com/)`brew install gh`\n\n[Cursor Agent](https://docs.cursor.com/agent)After installing Claude Code, authenticate before first use:\n\n```\nclaude login\ngit clone https://github.com/vishalnarkhede/agentdock.git\ncd agentdock\n./setup.sh\n```\n\nThis installs dependencies and installs the `agentdock`\n\nCLI to `~/bin`\n\n.\n\n**Web dashboard:**\n\n```\nagentdock web\n```\n\nOpens [http://localhost:5173](http://localhost:5173) with the API server on port 4800.\n\nOn first launch, the setup wizard will prompt you to:\n\n- Set your\n**base path**(the directory where your repos live, e.g.`~/projects`\n\n) **Auto-discover** git repositories in that directory**Select** which repos to add- Optionally set a\n**password** to protect the dashboard on your network\n\nYou can also add, remove, or scan for repos later in **Settings > Repositories**.\n\n**CLI:**\n\n```\nagentdock start my-repo                # launch agent in a repo\nagentdock start -r repo1 repo2         # grouped multi-repo session\nagentdock start my-repo --isolated     # isolated git worktree\nagentdock repos                        # list configured repos\nagentdock list                         # show active sessions\nagentdock stop --all                   # kill all sessions\n```\n\nagentdock works great from a phone — the UI is designed for it. Here's how to get it running:\n\n**1. Start the server** on your Mac/Linux machine as usual:\n\n```\nagentdock web\n```\n\nThe server binds to all network interfaces automatically, so no extra flags needed.\n\n**2. Find your local IP address:**\n\n```\n# macOS\nipconfig getifaddr en0\n\n# Linux\nhostname -I | awk '{print $1}'\n```\n\n**3. Open Chrome on your phone** and navigate to:\n\n```\nhttps://<your-ip>:5173\n```\n\nYou'll see a \"connection not private\" warning because the dev server uses a self-signed certificate. Tap\n\nAdvanced → Proceedto continue. This is expected and safe on your local network.\n\n**4. Add to your home screen** for a native app-like experience:\n\n**Chrome (Android):** tap the three-dot menu →*Add to Home screen***Chrome (iOS):** tap the Share icon →*Add to Home Screen*\n\nOnce added, it opens full-screen without the browser chrome, just like a real app.\n\n**Outside your home network?** Use the built-in ngrok integration — toggle it on from the header and you'll get a public HTTPS URL you can open from anywhere.\n\nAll configuration lives in `~/.config/agentdock/`\n\n. No database required.\n\nRepos are configured on first launch via the setup wizard, or anytime through the web UI at **Settings > Repositories**. From there you can:\n\n**Scan** a directory to auto-discover git repos**Add** repos manually by alias and path**Remove** repos you no longer need\n\nAlternatively, create `~/.config/agentdock/repos.json`\n\ndirectly:\n\n```\n[\n  { \"alias\": \"backend\", \"folder\": \"my-backend\", \"remote\": \"org/my-backend\" },\n  { \"alias\": \"frontend\", \"folder\": \"my-frontend\", \"remote\": \"org/my-frontend\" }\n]\n```\n\nRepos are expected under a base directory (default: `~/projects`\n\n). Override with:\n\n```\nexport AGENTDOCK_BASE_PATH=\"$HOME/code\"\n```\n\n| Config file | Purpose |\n|---|---|\n`~/.config/agentdock/auth-password` |\nProtect the web UI with a password |\n\nMCP servers (e.g., [Linear MCP](https://github.com/linear/linear-mcp)) can be added via **Settings > MCP Servers** in the web UI and are automatically synced to all agent configs.\n\n[Cortex](https://github.com/hjertefolger/cortex) adds persistent local memory to Claude Code sessions. It automatically archives context to a local SQLite database and enables cross-session recall using hybrid semantic + keyword search. Works seamlessly inside agentdock sessions — install it in your Claude Code MCP config and memories will persist across session restarts, compactions, and token limit resets.\n\nFor a deep dive into the internals, see\n\n[ARCHITECTURE.md].\n\n**Create a session**— pick repos, optionally enable worktree isolation** Agent launches**in a tmux session with appropriate permissions for file edits, git, and GitHub CLI** Status is tracked**via Claude Code lifecycle hooks (`PreToolUse`\n\n,`Stop`\n\n,`Notification`\n\n, etc.) that write to`/tmp/agentdock-status/`\n\n— no terminal scraping needed**Watch live output**— Bun attaches to tmux through a native PTY and streams raw terminal bytes over WebSocket** Type input**— keystrokes, paste and resize events are forwarded directly to the PTY; selection stays with the browser, and the wheel asks tmux for its scrollback**View the plan**— agents save structured plans to`~/.config/agentdock/plans/`\n\nwhich appear in the Plan tab; send follow-up messages directly from there**Browse changes**— the Changes tab shows a live git diff of all modified files** Restore**— stopped sessions can be restored with full Claude conversation history, bypassing the interactive picker for reliability**Stop**— kills the tmux session and cleans up any worktrees\n\n| Shortcut | Action |\n|---|---|\n`Ctrl+Shift+[` / `Ctrl+Shift+]` |\nSwitch to previous/next session (MRU order) |\n`Cmd+F` |\nIn-file search (when Files tab is open) |\n`Esc` |\nCollapse plan/changes/files panel |\n| Fullscreen button | Expand terminal to full window |\n\n```\nagentdock/\n  bin/\n    agentdock             # CLI tool\n    ad-agent              # Sub-agent launcher\n  server/                 # Bun + Hono (port 4800)\n    src/\n      services/\n        session-manager.ts    # Session lifecycle orchestration\n        tmux.ts               # tmux command interface\n        worktree.ts           # git worktree management\n        status.ts             # Agent status detection (hooks + fallback)\n        config.ts             # File-based configuration\n        linear.ts             # Linear ticket fetching\n        slack.ts              # Slack message fetching\n      routes/\n        sessions.ts           # Session CRUD + agent switching\n        repos.ts              # Repository management\n        ws.ts                 # WebSocket terminal streaming\n        git.ts                # Git diff / branch / PR operations\n        tickets.ts            # Ticket context fetching\n        quick.ts              # Quick actions (fix-me, Slack-to-fix)\n        ngrok.ts              # Ngrok tunnel management\n  client/                 # React + Vite + xterm.js (port 5173)\n    src/\n      pages/\n        Dashboard.tsx         # Split-panel: session list + terminal/plan/changes/files\n        CreateSession.tsx     # New session form with repo search + templates\n      components/\n        TerminalView.tsx      # xterm.js + WebSocket streaming\n        ChangesView.tsx       # Git diff viewer with inline commenting\n        FileExplorer.tsx      # File browser with in-file search\n        Header.tsx            # Quick actions, ngrok, session controls\n```\n\nagentdock is designed to support any CLI-based coding agent. See [AGENTS.md](/vishalnarkhede/agentdock/blob/main/AGENTS.md) for step-by-step instructions on adding a new agent (e.g., Codex, Aider, Copilot CLI).\n\n**Local-first**— server binds to`localhost`\n\nby default**No external dependencies**— all data stored in local files, no database or cloud services** Optional auth**— password protection via hashed tokens stored in`~/.config/agentdock/auth-password`\n\n**Agent isolation**— each session runs in its own tmux session with configurable tool permissions\n\nFor security issues, please see [SECURITY.md](/vishalnarkhede/agentdock/blob/main/SECURITY.md).\n\n| Platform | Status |\n|---|---|\n| macOS | Fully supported |\n| Linux (Ubuntu/Debian) | Fully supported |\n| Windows | Via WSL only (tmux requirement) |\n\n**Why tmux?**\ntmux provides reliable process management, session persistence, and terminal capture without reinventing process supervision. It's battle-tested and available everywhere.\n\n**Why Bun?**\nFast startup, built-in TypeScript support, and native WebSocket handling. The server starts in under 100ms.\n\n**Why no database?**\nSession state is ephemeral (tmux sessions) and configuration is simple (a few JSON/text files). A database would add complexity without benefit.\n\n**Can I run this on a remote server?**\nYes — set a password in `~/.config/agentdock/auth-password`\n\nand access the UI over your network. Use the built-in ngrok integration for a quick public URL, or set up SSH tunneling / a reverse proxy with HTTPS for a permanent setup.\n\n**How does status detection work?**\nClaude Code sessions use lifecycle hooks (`PreToolUse`\n\n, `Stop`\n\n, `Notification`\n\n, `SubagentStop`\n\n) that write status files to `/tmp/agentdock-status/`\n\n. This gives accurate working/waiting/done state without parsing terminal output. Cursor Agent uses terminal pattern matching as a fallback since it doesn't support hooks.\n\n**How does session restore work?**\nWhen a session is stopped (e.g. after a reboot), agentdock finds the most recent Claude conversation UUID from `~/.claude/projects/`\n\nand passes it directly to `claude --resume <uuid>`\n\n, bypassing Claude's interactive session picker entirely.\n\nContributions are welcome! See [CONTRIBUTING.md](/vishalnarkhede/agentdock/blob/main/CONTRIBUTING.md) for development setup and guidelines.\n\nMIT — see [LICENSE](/vishalnarkhede/agentdock/blob/main/LICENSE) for details.", "url": "https://wpnews.pro/news/agentdock-workspace-for-managing-agents-across-repos-and-worktrees", "canonical_source": "https://github.com/vishalnarkhede/agentdock", "published_at": "2026-08-31 23:00:50+00:00", "updated_at": "2026-08-31 23:22:22.586294+00:00", "lang": "en", "topics": ["developer-tools", "ai-agents", "ai-tools"], "entities": ["Vishal Narkhede", "Agentdock", "Claude Code", "Cursor Agent", "tmux", "git", "Node.js", "gh CLI"], "alternates": {"html": "https://wpnews.pro/news/agentdock-workspace-for-managing-agents-across-repos-and-worktrees", "markdown": "https://wpnews.pro/news/agentdock-workspace-for-managing-agents-across-repos-and-worktrees.md", "text": "https://wpnews.pro/news/agentdock-workspace-for-managing-agents-across-repos-and-worktrees.txt", "jsonld": "https://wpnews.pro/news/agentdock-workspace-for-managing-agents-across-repos-and-worktrees.jsonld"}}