Repository navigation
Memtrace v1.2.21
Memtrace v1.2.21
Agents see each other's edits at once, and every Java use of a method
New
- Agents working side by side on one repository see each other's edits within a fraction of a second. While Memtrace links a saved file into the graph,
memtrace find,memtrace callersandmemtrace calleesanswer at once from the file's saved text, with those lines marked[saved, not linked yet]or[saved, call not resolved yet], and the linked answer follows when the save is in. Memtrace's MCP tools add the same saved-file answer to theirs. On a 200,000-symbol Java repository with 20 agents editing at once, another agent read a new method and its caller 0.2 seconds after the write, half a second at worst, and no read returned an older answer without saying so. This also works right aftermemtrace start, while the first save is still being prepared. memtrace harness leansets Claude Code up with Memtrace's automatic help only: a short code map with each prompt, the files that use a method after the agent changes its declaration, and context beside a search. It leaves out the MCP tools, the skills and the guidance file, which together add about 10,000 tokens to every request.memtrace harness full, the default, keeps everything, andmemtrace harnesssays which one is set.
Improved
- Saves on large repositories are much faster. Memtrace keeps what it worked out for the rest of the repository in memory between saves and redoes only what a save changed, works on each save with a second processor core, and writes a save's links straight to where they belong instead of reading the whole repository again for every write. On a 200,000-symbol Java repository a one-file edit is linked into the graph in 10 to 25 seconds with up to 10 agents editing at once; with 20 a save can take a minute or two, while reads still answer at once from the saved files.
- The full Claude Code set-up no longer loads every Memtrace tool's description into every request. On Windows the installer used to register the tools that way, which added about 80,000 tokens to each request; updating Memtrace removes it.
- After a stop that was not clean, the store rebuilds its property index in a few large sorted writes instead of thousands of small ones that each rewrote much of the index.
- The first save after a start that has nothing kept from a clean stop, such as the first start after an update or after Memtrace was stopped abruptly, is linked much sooner on a large repository. Memtrace now reads every file while it loads the graph instead of after it, and loads the graph from the store in one read instead of two.
- Java call graphs now find nearly every place a method is used. Checked against the Java compiler's own list for Keycloak (48,000 use sites of 2,357 methods), Memtrace finds 99.5% of them, up from 58.9%, and 99.8% of the links it draws are in the compiler's list, up from 96.6% (most of the rest are places where a method handed over as a value is called, which the compiler does not list as a use). Calls inside lambdas, on variables a lambda captures, in nested and anonymous classes, through
var, records, call chains and the standard collections (list.get(0),map.get(key),stream.filter(x -> ..)) are now linked. Re-index your Java repositories withmemtrace indexto get the new links. - Java overloads are chosen by argument type, the way the compiler chooses them.
event.detail(key, text)andevent.detail(key, list)now link to the rightdetail, including overloads a class inherits from an interface or a superclass. Where the argument types do not settle it, Memtrace draws no link instead of guessing. - Java method references are recorded wherever they are written.
session::getUserorType::methodhanded to one of your own methods now counts as a use of that method, and an override is linked to every declaration above it, however many levels up, including overrides in anonymous classes. memtrace callersand the change guard list method references as uses of a method, and show the overrides and implementations of it as a list of their own, so a rename or a signature change reaches all of them.
Changed
- The change guard is on by default. When an agent changes a method's declaration, Memtrace sends it the files that use that method, so a rename or a signature change reaches all of them. In a trial of 12 Java renames on Keycloak, two tries each, Claude Code with the guard got 23 of 24 right against 16 of 24 without Memtrace. Set
MEMTRACE_GUARD=offto turn it off.
Fixed
- Restarting Memtrace after a clean stop no longer rebuilds everything on repositories with long Java expressions. What Memtrace keeps at a stop was written but could not be read back, so every start rebuilt it from the store and the first save after the start took minutes: on a 200,000-symbol repository about four and a half, now under one.
- A Java call written on a variable, such as
event.error(..), is no longer linked to a method of the surrounding class that merely has the same name, and a call is no longer linked to a method that cannot take that many arguments. - Type names written inside a nested Java class now resolve, and so do nested types named from another file (
Outer.Inner). Java files with more than 128 imports no longer lose their call links. memtrace callers,memtrace impactand the change guard no longer leave out a use written inside a lambda, such asusers.forEach(u -> u.isEnabled()). It is listed under the method the lambda is written in, andimpactgoes on from that method.memtrace callers --limitprints the lines you ask for, up to 200. A long answer used to be cut at a fixed size whatever the limit, and the part cut first was the list of overrides at the end.- On Windows, Memtrace's agent hooks could switch themselves off while Memtrace kept running. From then on the agent got no search context, no prompt briefing and no change guard until the next
memtrace start, and nothing said so. It happened most during busy sessions with many searches and edits. The hooks now stay registered for as long as Memtrace runs. - On large repositories, indexing could leave out every relationship that runs through a function passed as a value, such as a callback, and after that every save stayed pending and asked for a repair. It happened where many implementations of one interface call each other, as in a 200,000-symbol Java project. Memtrace now finishes that analysis there in seconds, the relationships are in the index, and saves are applied again. Re-index a large repository with
memtrace indexto get them. memtrace callerslists a function that passes another function on as a value, as it already listed method references.
Install
npm install -g memtrace