Skip to content

fix(cli): tool cursors cannot be redeemed by a later tool call #2252

Description

@ScriptedAlchemy

Problem

A next_cursor printed by tracedecay tool cannot be redeemed by the next tracedecay tool invocation. The follow-up call returns a typed unavailable problem instead of the next page, so a CLI user can never read past the first 10 rows of a relation page. The same cursor works inside one tracedecay serve MCP session.

Reproduction

Shipped CLI built from master at f60e18f plus #2130's branch (the branch does not touch cursors). Isolated profile (HOME, TRACEDECAY_DATA_DIR, TRACEDECAY_GLOBAL_DB, TRACEDECAY_DAEMON_SOCKET in a scratch dir), one daemon, starship@cc825b00 as the corpus:

tracedecay tool tracedecay_callees --args '{"node_id":"<src/modules/mod.rs::handle id>","maximum_depth":1,"meta":{"projection":"evidence","order":"source_position"}}' --json
# payload.total = 112, returned = 10, next_cursor = ccq2.…
tracedecay tool tracedecay_callees --args '{"node_id":"<same>","maximum_depth":1,"meta":{"projection":"evidence","order":"source_position","cursor":"<that next_cursor>"}}' --json

Observed on the second call (retried after 1 s, same result):

"problem":{"kind":"unavailable","code":"application.surface.unavailable","message":"The application service for this operation is unavailable",...,"unavailable_classification":"authority","retryable":true,"retry":"after_delay"}

Expected: the second page (rows 11 through 20). Sending the same two requests as tools/call over one tracedecay serve -p . stdio session pages through all 112 rows.

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions