Skip to content

v1.4.0

Choose a tag to compare

@github-actions github-actions released this 29 Sep 11:54
· 121 commits to main since this release

v1.4.0

Forcefield v1.4.0 adds local MCP server support and cuts startup time roughly in half on the measured development machine.

MCP servers

  • Connect to local MCP servers over stdio; their tools show up as mcp__<server>__<tool> alongside native tools.
  • /mcp lists servers and tools, and ff doctor reports last-known MCP state without starting anything.
  • A server that fails to start never fails the run: healthy servers keep working and the failure surfaces as a warning.
  • Status persists to .forcefield/mcp-status.json (temp file plus rename, mode 0600); a failed write leaves no partial file behind.

Startup performance

Measured with the unchanged benchd harness methodology on the development machine (Windows, Ryzen 7 7435HS); treat these as reference numbers, not guarantees:

  • ff --version: ~66 ms → ~39 ms median.
  • Cold ff run launch: ~164 ms → ~62 ms median.
  • Warm ff run launch: ~142 ms → ~44 ms median.
  • Binary size: 19,205,120 B → 19,214,848 B (+0.05%).

Two changes do most of the work. Cobra's Windows Explorer check walked the full OS process list on every invocation (~19 ms); it is now off, since Forcefield is a terminal tool. Project-root detection no longer spawns git rev-parse (~75 ms per spawn on Windows) in the clear cases: a pure-Go upward .git search answers, and anything ambiguous — worktree/submodule links, GIT_* overrides, cross-filesystem walks, unreadable paths — still goes through git exactly as before.

The rest is duplicate work removed: the config file is parsed once (permissions and provider resolution reuse the loaded config), capability probes and context-limit tables are computed once per process, and the sessions directory skips redundant create/chmod calls on every save.

Runtime hot paths

  • The system prompt base is built once per run instead of on every model turn.
  • Streamed text accumulates in a builder rather than reallocating per chunk; provider event channels are buffered.
  • Search resolves symlinked files once instead of twice; wheel scrolling no longer re-scans the transcript per notch.
  • None of these change output, file formats, error messages, or sandbox, permission, recovery, and redaction behavior.

Correctness

  • Fixed the MCP status failure test on Linux, where stat through a blocked path returns ENOTDIR rather than ENOENT.
  • Added Git parity coverage (plain, nested, worktree, submodule, symlinked, and malformed layouts) asserting byte-identical answers with the git subprocess on Windows and Linux.
  • Full test suite and go vet pass on both platforms.

Full Changelog: v1.3.1...v1.4.0