Problem
run_fastcontext always appends --traj, so the nominally non-trace fastcontext_explore path still creates a trajectory file in temp storage. In src/fastcontext_mcp/runtime.py:206-217, the non-trace branch uses tempfile.gettempdir() rather than omitting trajectory capture entirely.
Evidence
src/fastcontext_mcp/runtime.py:206-217 always extends the subprocess command with --traj.
README.md:172-177 says trajectories are written only when requested, which does not match the current default path.
tests/test_server.py:181-197 currently asserts that the non-trace path still receives a temp trajectory path.
Impact
This is an operational and privacy consistency issue. It adds hidden side effects to the non-trace API, creates unnecessary temp files, and contradicts the documented behavior that trajectories are only written when requested.
Recommended remediation
- Make trajectory emission opt-in only.
fastcontext_explore should omit --traj entirely.
- Keep trajectory capture behind the explicit trace path or an explicit trace flag.
- If always-on traceability is intentional, update the docs to state that clearly and explicitly.
Regression tests to add or adjust
- Update the non-trace test to assert that
--traj is not passed and no file is created.
- Add a trace-specific test that
fastcontext_explore_with_trace still writes a trajectory file when explicitly requested.
- Update the README to match the final behavior.
Problem
run_fastcontextalways appends--traj, so the nominally non-tracefastcontext_explorepath still creates a trajectory file in temp storage. Insrc/fastcontext_mcp/runtime.py:206-217, the non-trace branch usestempfile.gettempdir()rather than omitting trajectory capture entirely.Evidence
src/fastcontext_mcp/runtime.py:206-217always extends the subprocess command with--traj.README.md:172-177says trajectories are written only when requested, which does not match the current default path.tests/test_server.py:181-197currently asserts that the non-trace path still receives a temp trajectory path.Impact
This is an operational and privacy consistency issue. It adds hidden side effects to the non-trace API, creates unnecessary temp files, and contradicts the documented behavior that trajectories are only written when requested.
Recommended remediation
fastcontext_exploreshould omit--trajentirely.Regression tests to add or adjust
--trajis not passed and no file is created.fastcontext_explore_with_tracestill writes a trajectory file when explicitly requested.