deniz.in

Markets

Weather

Loading weather

· via Hacker News – Front Page (native)

JetBrains open-sources ThinkRail, an agentic IDE built on git worktrees and spec graphs

JetBrains has open-sourced ThinkRail, an Apache-2.0 agentic IDE that runs coding agents in isolated git worktrees and grounds them in a versioned spec graph.

JetBrains open-sources ThinkRail, an agentic IDE built on git worktrees and spec graphs

What ThinkRail is

JetBrains has released ThinkRail, an open-source IDE designed around AI coding agents rather than merely retrofitted with a chat panel. The project sits under the company's InnovationHub banner, is licensed Apache-2.0, and reached the Hacker News front page on October 24. It runs as a local launcher: install it, run the thinkrail command, and a browser-based interface opens. Builds cover macOS, Windows (including WSL) and Linux, where an archive-based installer and native library prerequisites are also documented. The only stated prerequisites are git and an authenticated pi provider.

Worktrees as the unit of work

According to the project's site, a project in ThinkRail is simply any local git repository, and a workspace is a git worktree cut from it, stored under ~/.thinkrail/worktrees/. Each workspace gets its own branch and working directory, and files, diffs, terminals and chats are all scoped to it, so switching workspaces is instant and state does not bleed between them.

The stated motivation is that agents should not work directly in your checkout. Several agents can run in parallel — one building a feature, another chasing a flaky test — and each one's changes stay confined to its own branch while main remains untouched. When the work finishes, you merge the workspace that succeeded and discard the rest; the repository absorbs only what you approve.

Specs as ground truth

The second pillar is what the project calls spec-first development. Every module carries a SPEC.md file whose frontmatter links it into a connected graph covering goals, architecture, modules and tasks. A bundled extension, pi-spec-graph, hands the agent a set of spec_* tools to search, navigate and maintain that graph, and a Specs tab renders it live for the human. Because the specs are plain markdown versioned next to the code, the project argues that intent survives beyond a single session: the agent keeps the documents current as it builds.

How it hosts the pi agent

ThinkRail does not implement its own agent. It runs the pi coding agent in-process, with pi responsible for model choice, skills, context compaction and cost accounting, while ThinkRail owns the workspace, the editor and the protocol between them — and, per the documentation, constructs no hidden prompts of its own.

The architecture is described as three rings: an engine host (packages/server) exposing an HTTP and WebSocket service, with each editor tab getting its own in-process pi session; a typed, versioned contract layer (packages/contracts); and a mobile-first React client (apps/web) that ships independently and can connect to any host. The editing surface uses Monaco, the engine behind VS Code, with file tabs per workspace, rendered markdown, a live diff of the workspace branch, and full pseudo-terminal sessions bound to the worktree — so you can run the tests yourself while the agent keeps typing.

Chat sessions stream as the engine works, and multiple sessions can run concurrently in one workspace, each with its own model. Token and cost counters update in real time; a sample transcript in the docs shows a completed turn at 25.9k tokens for $0.17. You can steer a turn mid-flight or queue a follow-up without waiting for the agent to finish, and the agent can ask structured questions back through the chat.

Why it matters

Two problems dominate agentic coding today: parallel agents trample each other's working trees, and an agent's understanding of a project evaporates when the session ends. ThinkRail takes a clear position on both. Worktree isolation maps agent output onto git's existing branch-and-merge model, making parallel agents safe by construction rather than by prompt discipline. The spec graph is the more unusual bet — encoding project intent as versioned, machine-readable markdown gives an agent durable grounding that chat history cannot provide. Because everything is Apache-2.0, other tool builders can borrow either idea regardless of whether ThinkRail itself gains traction. For JetBrains, it also signals where the company thinks editors are heading: an IDE built on the assumption that agents are first-class occupants of the environment, not a bolt-on sidebar.

  • #jetbrains
  • #open-source
  • #ai-agents
  • #ide
  • #developer-tools
  • #git

Related posts