Skip to content

Fix: stop MCP recall and explain while Trodden is paused - #198

Open
aayank13 wants to merge 1 commit into
mainfrom
fix/mcp-recall-pause
Open

aayank13 wants to merge 1 commit into
mainfrom
fix/mcp-recall-pause

Conversation

@aayank13

Copy link
Copy Markdown
Owner

Fixes #166

trodden pause is meant to stop both capture and recall, and the hooks honor it, but the MCP server's trodden_recall and trodden_explain tools never looked at the pause flag. With one procedure learned for "Page 2 in src/paginate.js repeats the last product from page 1" and Trodden paused, calling trodden_recall over MCP with a similar prompt still returned the full <trodden-memory> block, and trodden_explain returned the scores plus the same procedure. An agent connected through MCP kept getting procedures while the user believed recall was off.

Both tools share recall_text, so it now checks store.paused() right after opening the store, the same check the prompt and error hooks make, and returns "Trodden is paused. Run trodden resume to recall procedures again." instead of recalling. The tools still succeed rather than erroring, since a paused Trodden is a normal state, and the text tells the agent why nothing came back.

trodden_list, trodden_show and trodden_status are left alone on purpose. They browse what is stored, like the matching CLI commands, which also keep working while paused, and trodden_status already reports the pause.

To reproduce, I built the binary, used a scratch TRODDEN_HOME, ingested a transcript from a small git repository to learn one procedure, ran trodden pause, and drove trodden mcp over stdio. Before the change both tools returned the procedure. After it both return the paused message, and after trodden resume they return the procedure again. A new unit test pauses a fresh home and checks that recall and explain both return the paused message, then resumes and checks that they no longer do. It fails without the change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MCP recall ignores trodden pause

1 participant