{
  "$type": "site.standard.document",
  "content": "---\ntitle: \"Running Claude Code within Zed\"\ndescription: \"Switching from Zed's Agent panel to Claude Code for flat-fee pricing, with a\n  simple task config to keep the workflow inside Zed.\"\ntags:\n  - ai\n  - dev\n---\n\nAfter several months using Zed's built-in\n[Agent panel](https://zed.dev/docs/ai/agent-panel) I've switched to Claude Code.\nThe main reason is cost. I'm still using the same models---still primarily\nSonnet (and occasionally Opus) 4---but using them via the Agent panel incurs\nper-token billing via the Anthropic API. I was racking up a lot of costs (around\n100USD/week) even with a _bit_ of restraint, although still using it fairly\nheavily during all work days.\n\nClaude Code allows one to pay a flat-fee subscription (I'm now nearly through my\nfirst month of [MAX 20x](https://www.anthropic.com/max), so I'm already ahead).\nAnd it's _really nice_ to have the flat fee; it does change the way you use the\nagent (and sub-agents).\n\nOne downside is that you have to use their\n[`claude` CLI tool](https://docs.anthropic.com/en/docs/claude-code/overview).\nSince I still want to stay in Zed (even if I can't use the Agent panel) I've\nadded a task which gets me pretty close to the same workflow I had before. Add\nthis to your zed `tasks.json`:\n\n```json\n{\n  \"label\": \"claude\",\n  \"command\": \"claude --dangerously-skip-permissions\",\n  \"reveal\": \"always\",\n  \"use_new_terminal\": true,\n  \"allow_concurrent_runs\": false\n}\n```\n\nAnecdotally, it also seems like Claude Code is a bit more token-efficient than\nusing the same models via the Zed Agent panel. Watching the agent at work, it\nseems more parsimonious in only reading sections of files into context, and\nwhole files only when absolutely necessary. But I don't have hard data to back\nthat up.\n\nThe workflow is almost as good, with only two things that I'm really missing\nfrom my old setup.\n\n1. You can't trivially switch providers/models like you can when you're using\n   the Zed Agent panel. But the Anthropic models are pretty good---at least\n   equal to best-in-class for the sort of work I do.\n\n2. Claude code no longer has direct access to the LSP diagnostics---because that\n   stuff in general Just Works^TM in Zed, it was nice to not have to set up\n   extra MCPs to get access to the language-aware tooling stuff. I used to be\n   able to just say \"fix the warnings in this project\" and it'd do what I meant,\n   but now I have to either set up a MCP server, or hope that Claude (possibly\n   with a hint in `CLAUDE.md`) knows how to run the CLI tools to get the same\n   information.\n\nThe thing that puts me at ease with this sort of (big) workflow change is that\nthere's really not too much lock-in; if the pricing landscape shifts I'd happily\nswitch to another provider. The main skill---context management, and figuring\nout how to communicate to an LLM what needs to be done in clear, concise\nlanguage---is unchanged.\n\nIf this helps you get the most out of your setup, then happy Claude-in-Zedding.\n\n## Update (2025-09-18)\n\nI've since wrapped the Claude CLI in a tmux session to make the workflow even\nsmoother. This means:\n\n- each project gets its own persistent Claude session that keeps running after\n  Zed is closed (especially useful for remote Zed sessions where you want the\n  agent to keep working)\n- you can easily reconnect to an existing Claude conversation when switching\n  between projects\n- the session names automatically match your project directory names\n\nThe wrapper script (`claude-tmux`) and updated Zed task configuration are\n[in my dotfiles](https://github.com/benswift/.dotfiles) if you want to steal\nthem.\n",
  "createdAt": "2026-05-13T23:14:43.873Z",
  "description": "Switching from Zed's Agent panel to Claude Code for flat-fee pricing, with a simple task config to keep the workflow inside Zed.",
  "path": "/blog/2025/07/23/running-claude-code-within-zed",
  "publishedAt": "2025-07-23T00:00:00.000Z",
  "site": "at://did:plc:tevykrhi4kibtsipzci76d76/site.standard.publication/self",
  "tags": [
    "ai",
    "dev"
  ],
  "textContent": "Switching from Zed's Agent panel to Claude Code for flat-fee pricing, with a simple task config to keep the workflow inside Zed.",
  "title": "Running Claude Code within Zed"
}