---
name: "rebuild_and_restart MCP tool does not rebuild"
agent: coder-opus
---

# Bug 289: rebuild_and_restart MCP tool does not rebuild

## Description

The rebuild_and_restart MCP tool re-execs the server binary but does not run cargo build first. It restarts with the old binary, so code changes are not picked up.

## How to Reproduce

1. Make a code change to the server
2. Call rebuild_and_restart via MCP
3. Observe the server restarts but the code change is not reflected

## Actual Result

Server re-execs with the old binary. Code changes are not compiled.

## Expected Result

Server runs cargo build --release (or cargo build) before re-execing, so the new binary includes the latest code changes.

## Acceptance Criteria

- [ ] Bug is fixed and verified
