Skip to content

[voice-call] get_status returns found:false for completed calls once evicted from in-memory manager — no fallback to persisted call store #96586

Closed

Description

@NiTeCoMM-code

Filed against @openclaw/voice-call@2026.6.10 (also present in 2026.6.5).

Summary

The voice_call tool's get_status action (and the legacy mode: "status" path) only checks the in-memory call manager via rt.manager.getCall(callId) || rt.manager.getCallByProviderCallId(callId). There is no fallback to the persisted call store when the in-memory record has been evicted.

This causes get_status to report { found: false } for calls that completed successfully and have a full transcript persisted to disk — the agent has no way to retrieve the conversation that happened.

Root cause

In dist/index.js:

case "get_status": {
    const callId = normalizeOptionalString(rawParams.callId) ?? "";
    const call = rt.manager.getCall(callId) || rt.manager.getCallByProviderCallId(callId);
    return json(call ? { found: true, call } : { found: false });
}

rt.manager.getCall() is an in-memory lookup. Once a call exits the manager's active map (cleanup after completion, gateway restart, or simply enough time passing), this returns undefined regardless of whether a persisted record exists.

Meanwhile, the full call record — including a complete turn-by-turn transcript — is independently persisted under plugin_state_entries (plugin_id=voice-call) as base64-encoded, chunked JSON blobs keyed like event:<seq6>:<sequence>:<uuid>:chunk:NNNN. This data is confirmed present and complete (verified manually via direct SQLite query) for calls where get_status reports found: false.

Repro

  1. Initiate an outbound call via voice_call (initiate_call).
  2. Let the call complete naturally.
  3. Wait — even a few minutes is enough, and a gateway restart in between guarantees it — then call get_status with the same callId.
  4. Observe: { found: false }, despite the call having completed normally and a full transcript existing in the plugin's persisted SQLite state.

Impact

Any agent workflow that says "call me and report back what I said" silently fails at the reporting step. The agent has no way to know the call succeeded or to retrieve what was said — it can only report that the call status is unknown, which reads to the end user as if voice memory/transcription doesn't work at all, when in fact the data is sitting right there in the plugin's own store.

Suggested fix

get_status (and mode: "status") should fall back to querying the persisted call store (the same one transcripts are written to) when the in-memory manager lookup misses, before returning found: false. Alternatively, expose a dedicated get_transcript action that reads directly from the persisted store by callId, independent of in-memory manager state, since transcripts are clearly intended to survive past the live call lifecycle (they're written incrementally during the call as discrete event chunks).

Happy to provide the decoded persisted record structure if useful for reproducing.

Activity

  1. clawsweeper commented on Jun 24, 2026

    @clawsweeper
    Contributor

    Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 24, 2026, 7:12 PM ET / 23:12 UTC.

    Summary
    Keep open: current main and latest release still have the reported voice-call status gap. The agent tool and gateway status method only check active in-memory call maps, while terminal calls are persisted and then removed from those maps, so a completed call can have stored transcript state and still return found: false.

    Reproducibility: yes. from source inspection: complete or restart past a call so active maps no longer contain it, then query get_status while plugin-state history still has the record. I did not place a live call in this read-only review, so this is source-reproducible rather than live-reproduced.

    Next step
    A single focused repair can be attempted in the voice-call plugin because the source path, missing fallback, and regression coverage are clear.

    Review details

    Best possible solution:

    Keep the existing voice-call tool and gateway surfaces, and add a bounded persisted-record lookup for status misses by call id or provider call id inside the voice-call plugin.

    Do we have a high-confidence way to reproduce the issue?

    Yes from source inspection: complete or restart past a call so active maps no longer contain it, then query get_status while plugin-state history still has the record. I did not place a live call in this read-only review, so this is source-reproducible rather than live-reproduced.

    Is this the best way to solve the issue?

    Yes: reusing the existing persisted call record store on status misses is the narrowest maintainable fix. A new get_transcript action may be useful later, but it is not needed to repair the broken existing status behavior.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • No live outbound call was placed during this read-only review, so the runtime symptom is source-proven rather than live-reproduced.
    • A repair should keep plugin-state call records as the single persistence source and avoid adding a second transcript API or compatibility path unless maintainers explicitly want that product surface.

    Codex review notes: model internal, reasoning high; reviewed against 3ab8d6aa609a.

    Label changes

    Label justifications:

    • P2: This is a normal-priority voice-call plugin bug with a clear source-level cause and limited surface area.
    • impact:message-loss: The agent-facing status path can report a completed call as missing even when transcript data was persisted.
    • impact:session-state: The failure is drift between active in-memory call state and persisted voice-call state after finalization or restart.
    Evidence reviewed

    Acceptance criteria:

    • node scripts/run-vitest.mjs extensions/voice-call/index.test.ts
    • node scripts/run-vitest.mjs extensions/voice-call/src/manager/store.test.ts extensions/voice-call/src/manager.restore.test.ts

    What I checked:

    • Agent tool status is active-only on current main: The voice_call get_status action normalizes callId, checks rt.manager.getCall(callId) || rt.manager.getCallByProviderCallId(callId), and returns { found: false } on a miss without reading persisted history. (extensions/voice-call/index.ts:761, 3ab8d6aa609a)
    • Gateway status has the same active-only lookup: The voicecall.status gateway method returns active calls without an id, but with callId or sid it only checks the active manager lookups before returning { found: false }. (extensions/voice-call/index.ts:618, 3ab8d6aa609a)
    • Manager lookup methods read active maps only: getCall reads activeCalls, getCallByProviderCallId resolves through the provider-call active map, and persisted history is exposed separately through getCallHistory. (extensions/voice-call/src/manager.ts:429, 3ab8d6aa609a)
    • Completed calls are persisted then removed from active indexes: finalizeCall persists the terminal call record, then deletes the call from activeCalls and removes the provider-call mapping, creating the reported persisted-but-not-found state. (extensions/voice-call/src/manager/lifecycle.ts:30, 3ab8d6aa609a)
    • Persisted history reader already exists: getCallHistoryFromStore reads the plugin-state backed call record events and returns retained history rows, so the likely fix is wiring a persisted lookup into status rather than adding a new storage system. (extensions/voice-call/src/manager/store.ts:379, 3ab8d6aa609a)
    • Tests cover active status but not the reported persisted-status miss: The current get_status test asserts the active stub result, while stale persisted history is only used for the speak error path, leaving this status regression uncovered. (extensions/voice-call/index.test.ts:652, 3ab8d6aa609a)

    Likely related people:

    • @shakkernerd: Blame for the current active-only status paths, manager lookup methods, lifecycle cleanup, and store helpers points to commit 8ecbf83c678ccd27cc76542a179e1bc89779a87d, and the issue timeline mentions this handle for the voice-call surface. (role: recent area contributor; confidence: high; commits: 8ecbf83c678c; files: extensions/voice-call/index.ts, extensions/voice-call/src/manager.ts, extensions/voice-call/src/manager/lifecycle.ts)
    • @steipete: Git history shows substantial voice-call plugin implementation/refactor work and a local merge of the prior stale-call restore fix that is adjacent to the active-versus-persisted boundary. (role: feature-history owner; confidence: high; commits: 367baaca2092, 42c17adb5e4d, 89574f30cb00; files: extensions/voice-call/index.ts, extensions/voice-call/src/manager.ts, extensions/voice-call/src/manager/lifecycle.ts)
    • @garnetlyx: PR history for fix(voice-call): verify call status with provider before loading stale calls #4325 shows this contributor changed voice-call restart hydration to verify stale persisted calls before restoring active state, which is adjacent to this issue's persisted-versus-active lookup boundary. (role: adjacent restore-path contributor; confidence: medium; commits: ffa7c13c9b1c; files: extensions/voice-call/src/manager.ts, extensions/voice-call/src/manager.restore.test.ts)
    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
    • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
  2. added
    P2Normal backlog priority with limited blast radius.
    impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.
    impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.
    no-staleExclude from stale automation
    issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.
    clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.
    clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.
    clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.
    on Jun 24, 2026
  3. NiTeCoMM-code commented on Jul 3, 2026

    @NiTeCoMM-code
    Author

    Update from the original reporter after reviewing PR activity to date.

    Where the candidate fixes stand:

    A wrinkle since these PRs were written: #97870 may have mooted the fallback-only approach for the impact reported here.

    #97870 merged read-scoped status payload redaction — status reads now project through toVoiceCallStatus, which omits the transcript (see the runtime proof in #96727: the after-fix status JSON contains call state and timestamps only). If that redaction applies to the agent-facing get_status tool surface, then a persisted-store fallback alone restores found: true but still doesn't let the agent retrieve what was said — the "call me and report back" workflow keeps failing.

    That would make the second option in my original suggestion the load-bearing one: a dedicated get_transcript action that reads from the persisted store by callId, with whatever redaction policy fits that surface (transcript text in-scope for the agent's own call; phone numbers/provider IDs can stay redacted).

  4. 5 remaining items

  5. added a commit that references this issue on Jul 5, 2026
    39b5bf3
  6. added a commit that references this issue on Jul 6, 2026
    55a6eef
  7. locked as resolved and limited conversation to collaborators on Jul 30, 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

    P2Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.no-staleExclude from stale automation

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions