Source: Source pull request number: 867 in rohitg00/agentmemory (URL omitted to avoid GitHub cross-reference)
Title: fix: make CALL_TIMEOUT_MS env-overridable and raise HTTP worker default_timeout to 600 s
Author: kek-Sec
State: open
Draft: no
Merged: no
Head: kek-Sec/agentmemory:fix/866-configurable-call-timeout @ 6b1b780
Base: main @ 749c280
Labels: (none)
Changed files: 0
Commits: 0
Created: 2026-06-09T09:28:06Z
Updated: 2026-06-09T09:48:42Z
Closed: (not closed)
Merged at: (not merged)
Original PR body:
What
CALL_TIMEOUT_MS in src/mcp/rest-proxy.ts is now env-overridable via
AGENTMEMORY_CALL_TIMEOUT_MS, with a default of 600 000 ms (was 15 000 ms).
Mirrors the existing AGENTMEMORY_PROBE_TIMEOUT_MS pattern already in the
same file.
iii-config.yaml default_timeout raised from 180 000 ms to 600 000 ms.
callTimeoutMs() is exported; test/mcp-call-timeout.test.ts covers the
default value, env-var parsing, malformed-value fallback, and the abort
behaviour under a hanging server response (9 new tests, all pass).
Why
On stores with 1 100+ semantic memories and 630+ insights,
memory_consolidate and memory_reflect reliably time out because the
proxy's HTTP client aborts the request after 15 s — before the server
finishes the LLM-backed operation.
Making the timeout env-overridable is a non-breaking improvement: users who
don't set the env var get the new 600 s default; anyone who needs a
different ceiling can set AGENTMEMORY_CALL_TIMEOUT_MS in their MCP server
env config.
Related to #655 (which addresses the server-side sequential KV bottleneck).
This addresses the client-side transport ceiling — both fixes are needed for
large stores to complete reliably.
How to verify
- Point the server at a large memory store (500+ semantic entries).
- Run
memory_consolidate — it should complete instead of returning a
timeout error.
- Set
AGENTMEMORY_CALL_TIMEOUT_MS=5000 and confirm a small store still
respects the override.
npm test — the new suite at test/mcp-call-timeout.test.ts passes (9
tests); no regressions in the existing suite.
Fixes #866
Summary by CodeRabbit
-
New Features
- Increased HTTP worker default timeout to support longer-running operations (now 600s).
- Proxied request timeout is now configurable and resilient to invalid values, with safe clamping to platform limits.
-
Tests
- Added comprehensive tests validating timeout parsing, clamping, defaults, and proxy abort behavior.
Local branch: review/issue-866-pr-867-mcp-proxy-timeout
Fork PR: not created
Fork decision: adapted for this fork according to local review documentation. Local decision evidence: adapted import.
Verification: see local task record docs/todos/2026-06-15-issue-866-pr-867-mcp-timeout/todo.md for recorded checks and evidence.
Notes: tracker updated from local review documentation on 2026-06-16; issue remains open until separately closed.
Source: Source pull request number: 867 in rohitg00/agentmemory (URL omitted to avoid GitHub cross-reference)
Title: fix: make CALL_TIMEOUT_MS env-overridable and raise HTTP worker default_timeout to 600 s
Author: kek-Sec
State: open
Draft: no
Merged: no
Head: kek-Sec/agentmemory:fix/866-configurable-call-timeout @ 6b1b780
Base: main @ 749c280
Labels: (none)
Changed files: 0
Commits: 0
Created: 2026-06-09T09:28:06Z
Updated: 2026-06-09T09:48:42Z
Closed: (not closed)
Merged at: (not merged)
Original PR body:
What
CALL_TIMEOUT_MSinsrc/mcp/rest-proxy.tsis now env-overridable viaAGENTMEMORY_CALL_TIMEOUT_MS, with a default of 600 000 ms (was 15 000 ms).Mirrors the existing
AGENTMEMORY_PROBE_TIMEOUT_MSpattern already in thesame file.
iii-config.yamldefault_timeoutraised from 180 000 ms to 600 000 ms.callTimeoutMs()is exported;test/mcp-call-timeout.test.tscovers thedefault value, env-var parsing, malformed-value fallback, and the abort
behaviour under a hanging server response (9 new tests, all pass).
Why
On stores with 1 100+ semantic memories and 630+ insights,
memory_consolidateandmemory_reflectreliably time out because theproxy's HTTP client aborts the request after 15 s — before the server
finishes the LLM-backed operation.
Making the timeout env-overridable is a non-breaking improvement: users who
don't set the env var get the new 600 s default; anyone who needs a
different ceiling can set
AGENTMEMORY_CALL_TIMEOUT_MSin their MCP serverenv config.
Related to #655 (which addresses the server-side sequential KV bottleneck).
This addresses the client-side transport ceiling — both fixes are needed for
large stores to complete reliably.
How to verify
memory_consolidate— it should complete instead of returning atimeout error.
AGENTMEMORY_CALL_TIMEOUT_MS=5000and confirm a small store stillrespects the override.
npm test— the new suite attest/mcp-call-timeout.test.tspasses (9tests); no regressions in the existing suite.
Fixes #866
Summary by CodeRabbit
New Features
Tests
Local branch: review/issue-866-pr-867-mcp-proxy-timeout
Fork PR: not created
Fork decision: adapted for this fork according to local review documentation. Local decision evidence: adapted import.
Verification: see local task record docs/todos/2026-06-15-issue-866-pr-867-mcp-timeout/todo.md for recorded checks and evidence.
Notes: tracker updated from local review documentation on 2026-06-16; issue remains open until separately closed.