Uh oh!
There was an error while loading. Please reload this page.
feat: project memory layer (tool + system context source) - #44539
feat: project memory layer (tool + system context source)#44539savagelysubtle wants to merge 2 commits into
Conversation
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
The following comment was made by an LLM, it may be inaccurate: Potential Duplicate PRs FoundBased on the search results, I found two related PRs that may be addressing similar memory functionality:
Both of these PRs seem to address the same problem space of persistent memory across sessions. You should check their implementation details and status to see if they cover the same scope or if there's an opportunity to consolidate. |
This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window. Feel free to open a new pull request that follows our guidelines. |
Summary
Adds a Claude-style file-based memory layer so agents accumulate knowledge across sessions.
memorytool (packages/opencode/src/tool/memory.ts)list/read/write/delete, namespaced names supported (architecture/decisions)<xdg-data>/opencode/memory/<project-slug>/*.md— per-project isolation via a worktree slugcore/memorysystem context sourceDesign note
Follows Anthropic's memory-tool pattern: files curated by the agent itself rather than an embedding pipeline — just-in-time retrieval, works with compaction/context editing instead of against them.
Test plan
test/tool/memory.test.ts: write → list → read → delete round-trip; path traversal rejectedtest/tool/: 341 passing (1 pre-existing failure inwritepermissions test, reproduced on clean tree)bun typecheckclean inpackages/coreandpackages/opencode