Skip to content

In-process memory_sessions ignores limit and returns Sessions unsorted #49

Closed

Description

@possiblyneal

Parent

Follow-up from #40 / PR #48.

What to build

The in-process MCP tool memory_sessions should return the same newest-first page that GET /agentmemory/sessions returns: sorted by startedAt (rows without one last), honouring limit, with total. Today it reads the sessions scope directly, ignores limit, and returns rows in insertion order, so the recap, handoff and session-history skills get the oldest Sessions when they run against the in-process server instead of the standalone shim.

Acceptance criteria

  • memory_sessions with limit: N returns the N newest Sessions and a total
  • A Session row without startedAt never throws and sorts last
  • Test at the MCP handler seam, hand-rolled mockKV()/mockSdk()

Blocked by

  • None — can start immediately.

Activity

  1. possiblyneal commented on Oct 6, 2026

    @possiblyneal
    OwnerAuthor

    Fixed on branch possiblyneal/wolffish (ba4bee7). Shared listSessionsPage in src/functions/sessions-page.ts backs both REST and MCP.

  2. added a commit that references this issue on Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentFully specified, ready for an AFK agent

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions