Skip to content

Route Memtrace MCP calls per Session working directory; minimal plugin (v0.3.0) - #2

Merged
Alex793x merged 5 commits into
syncable-dev:mainfrom
magalz:dsh-0.3.0
Nov 21, 2026
Merged

Alex793x merged 5 commits into
syncable-dev:mainfrom
magalz:dsh-0.3.0

Conversation

@magalz

@magalz magalz commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Why

Inside DeepSeek Harness, every Memtrace call failed with:

memdb: server_info unavailable: no workspace owner is attached yet; this session attaches when `memtrace start` publishes one

memtrace mcp picks its repository from its working directory. dsh-mcp-client 0.2.2-rc.5 starts one child per config row with a fixed cwd, and this row had none. The child therefore ran in the dsh profile folder, which holds no repository and has no owner to attach to.

What changed

  • The mcp-memtrace row sets perWorkingDirectory: true. The fix lives in dsh-mcp-client and is proposed upstream in mcp-client: run stdio tool calls in the calling Session's working directory (opt-in perWorkingDirectory) deepseek-ai/deepseek-harness#13951. DeepSeek Harness does not accept external pull requests, so it is a Discussion (Ideas).
    • With that option, each tool call runs in a child started in the calling Session's working directory.
    • Git worktrees resolve to their main repository's store.
  • Stock dsh: a dsh without the option ignores the key, because Schemastery keeps unknown keys. There, restate the row with cwd: <repo root> (documented in both READMEs).
  • Minimal plugin:
    • removed the unused bin/memtrace-mcp.js launcher and its npx-fallback resolver, plus two fields of load-skills that nothing read;
    • the docs no longer promise an npx fallback.
  • Breaking: the published dsh-plugin-memtrace-mcp bin is gone, so the version goes to 0.3.0.

Verification

  • node --test: 11/11.
  • Live in dsh, with the patched client: DeepSeek subagents started in two different repositories each called mcp__memtrace__list_indexed_repositories.
    • Both calls succeeded, and each saw its own repository.
    • dsh started one memtrace mcp child per Session folder.

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

magalz and others added 5 commits November 20, 2026 14:21
Set perWorkingDirectory: true on the mcp-memtrace row so dsh-mcp-client
starts each tool call in a child in the calling Session's working
directory (git worktrees resolve to the main repository's store). This
needs dsh-mcp-client with that option; a stock dsh ignores the unknown
key, and there a restated row's cwd: <repo root> is the fallback.

Remove the published dsh-plugin-memtrace-mcp bin, its launcher, and the
memtrace resolver; package.json drops bin and bin/ and moves to 0.3.0.
README (en/zh) and the arc42 docs describe the option, the patched-client
requirement, and the cwd restate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rewrite the runtime, deployment, risk, and ADR docs for the pinned
`memtrace` command and per-Session `perWorkingDirectory` routing, with
the stock-dsh `cwd` restate. Deduplicate the README explanation (EN/ZH)
into How it works and add a Compatibility row for the patched client.

Drop the unused directory/resourceDirectory fields from load-skills and
their test assertions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…mal plugin (v0.3.0)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ugin (v0.3.0)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@blocksorg

blocksorg Bot commented Nov 20, 2026

Copy link
Copy Markdown

Mention Blocks like a regular teammate with your question or request:

@blocks review this pull request
@blocks make the following changes ...
@blocks create an issue from what was mentioned in the following comment ...
@blocks explain the following code ...
@blocks are there any security or performance concerns?

Run @blocks /help for more information.

Workspace settings | Disable this message

@magalz

magalz commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

The client-side proposal for perWorkingDirectory is in deepseek-ai/deepseek-harness#13951. DeepSeek Harness does not accept external pull requests right now, so it was posted as a Discussion (Ideas). Until a release ships it, a stock dsh ignores the key, and the README's cwd restate applies.

@Alex793x
Alex793x merged commit 68c3699 into syncable-dev:main Nov 21, 2026
2 checks passed
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.

2 participants