Skip to content

Fix ToolNotFoundError: memory_find when ChromaDB is unavailable#65

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/fix-tool-not-found-error
Draft

Fix ToolNotFoundError: memory_find when ChromaDB is unavailable#65
Copilot wants to merge 2 commits intomainfrom
copilot/fix-tool-not-found-error

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 14, 2026

The system prompt unconditionally instructed the LLM to call memory_find as its mandatory first action, but memory tools are only registered with the agent when shared_vectordb_client is Some. When ChromaDB is not configured or fails to connect, the LLM still attempts the call, producing ToolNotFoundError: memory_find on every message.

Changes

  • constants.rs: Added SYSTEM_PROMPT_NO_MEMORY — a variant of the system prompt with the mandatory memory retrieval step, memory tool notes, and memory rules removed. Added build_system_prompt(has_memory_tools: bool) -> &'static str to select between the two. Also fixed a pre-existing typo (aggreableagreeable).

  • agent.rs: Replaced static .preamble(SYSTEM_PROMPT) with .preamble(build_system_prompt(shared_vectordb_client.is_some())), aligning the agent's instructions with its actual registered toolset.

// Before
let mut agent_builder = llm_client
    .agent("gemini-3-flash-preview")
    .preamble(SYSTEM_PROMPT)  // always includes mandatory memory_find step

// After
let has_memory_tools = shared_vectordb_client.is_some();
let mut agent_builder = llm_client
    .agent("gemini-3-flash-preview")
    .preamble(build_system_prompt(has_memory_tools))  // omits memory instructions when tools absent

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • cdn.pyke.io
    • Triggering command: /home/REDACTED/work/website/website/target/debug/build/ort-sys-777fcbc04738e5d0/build-script-main /home/REDACTED/work/website/website/target/debug/build/ort-sys-777fcbc04738e5d0/build-script-main /home/REDACTED/work/website/website/target/debug/deps/librustc_hash-d607bcef25eb77-I /home/REDACTED/work/website/website/target/debug/deps/libregex-901dd4b1c30edd8b.rl/home/REDACTED/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/aws-lc-sys-0.39.1/include /home/REDACTED/work/website/website/target/debug/deps/libregex_automata-81b7502384-I /home/REDACTED/work/website/website/target/debug/deps/libregex_syntax-b4a05c81c718/home/REDACTED/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/aws-lc-sys-0.39.1/aws-lc/include 9.1/generated-include /home/REDACTED/work/website/website/target/debug/deps/libeither-63f923717c242b89.r/home/REDACTED/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/aws-lc-sys-0.39.1/aws-lc/third_party/s2n-bignum/include 9.1/include /home/REDACTED/work/website/website/target/debug/deps/liblibloading-faa6c5bf817954/home/REDACTED/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/aws-lc-sys-0.39.1/aws-lc/third_party/s2n-bignum/s2n-bignum-imported/include 9.1/aws-lc/include /home/REDACTED/work/website/website/target/debug/deps/liblibc-5a1706567bedcee1.rlib 9.1/aws-lc/third_party/s2n-bignum/include 9.1/�� 9.1/aws-lc/third_party/s2n-bignum/s2n-bignum-imported/include 9.1/aws-lc/third_party/s2n-bignum/s2n-bignum-imported/include 9.1/aws-lc/third_party/jitterentropy/jitterentropy-library f/aws-lc-sys-0.3cc uild/syn-cfb0e64-m64 f/aws-lc-sys-0.3/home/REDACTED/work/website/website/target/debug/build/libxml-de86e7b8bf16e3bb/rus-g /out/ebcd52e9457b6221-x509.o (dns block)
    • Triggering command: /home/REDACTED/work/website/website/target/debug/build/ort-sys-1af73e47a7997777/build-script-main /home/REDACTED/work/website/website/target/debug/build/ort-sys-1af73e47a7997777/build-script-main -std=c11 -I /home/REDACTED/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/aws-lc-sys-0.3--64 hVCy/list /home/REDACTED/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/aws-lc-sys-0.3/home/REDACTED/work/website/website/target/debug/build/aws-lc-sys-4da5b4205aeecb8a/out/27a075eab3d35364-pem_pkey.o -I /home/REDACTED/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/aws-lc-sys-0.39.1/aws-lc/include e0e40e564.derive_builder_macro.65935b84f9407ab8-cgu.0.rcgu.o /home/REDACTED/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/aws-lc-sys-0.39.1/�� e0e40e564.9lvd27ii7256cnzv6hasv8m68.rcgu.o /home/REDACTED/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/aws-lc-sys-0.39.1/aws-lc/third_party/s2n-bignum/s2n-bignum-imported/include 9.1/�� d9e1a8bda17.rlib rlib 775a.rlib lib (dns block)
    • Triggering command: /tmp/codeql-scratch-a9c55f7acc8420df/dbs/rust/working/target/debug/build/ort-sys-1af73e47a7997777/build-script-main /tmp/codeql-scratch-a9c55f7acc8420df/dbs/rust/working/target/debug/build/ort-sys-1af73e47a7997777/build-script-main -I /home/REDACTED/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/aws-lc-sys-0.3--gdwarf-4 -I /home/REDACTED/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/aws-lc-sys-0.3-o s-a30eea7215112681/out/libonig.a s-a30eea7215112681/out/a445302c6d3dcb51-iso8859_10.o s-a30eea7215112681/out/a445302c6d3dcb51-iso8859_11.o s-a30eea7215112681/out/a445302c6d3dcb51-iso8859_13.o s-a30eea7215112681/out/a445302c6d3dcb51-iso8859_14.o s-a30eea7215112681/out/a445302c6d3dcb51-iso8859_15.o s-a30eea7215112681/out/a445302c6d3dcb51-iso8859_16.o s-a30eea7215112681/out/a445302c6d3dcb51-euc_tw.o s-a30eea7215112681/out/a445302c6d3dcb51-euc_kr.o s-a30eea7215112681/out/a445302c6d3dcb51-big5.o s-a30eea7215112681/out/a445302c6d3dcb51-gb18030.o s-a30eea7215112681/out/a445302c6d3dcb51-koi8_r.o s-a30eea7215112681/out/a445302c6d3dcb51-cp1251.o s-a30eea7215112681/out/a445302c6d3dcb51-euc_jp_prop.o s-a30eea7215112681/out/a445302c6d3dcb51-sjis_prop.o (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

… based on memory tool availability

Agent-Logs-Url: https://github.com/wonrax/website/sessions/6771b191-f49c-43f0-9267-4ed66ebc8baa

Co-authored-by: wonrax <28887874+wonrax@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix ToolNotFoundError in memory_find execution Fix ToolNotFoundError: memory_find when ChromaDB is unavailable Apr 14, 2026
Copilot AI requested a review from wonrax April 14, 2026 18:43
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.

Error while executing tool: Toolset error: ToolNotFoundError: memory_find

2 participants