Skip to content

fix: prevent OXAP from replaying accepted prompts - #11624

Open
lsm wants to merge 5 commits into
devfrom
fix/oxap-replay-consumption
Open

lsm wants to merge 5 commits into
devfrom
fix/oxap-replay-consumption

Conversation

@lsm

@lsm lsm commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner

OXAP chats could repeat an answered prompt and move the original prompt forward in the transcript. The Claude Code silence watchdog reopened already accepted OXAP prompts.

  • Record native acceptance before processing the reply.
  • Keep OXAP outside the SDK's automatic re-feed paths.

Verified: Real Codex started two native turns for two sends across a settings change and daemon restart. DeepSeek sent once, a busy hub retried once, and Claude Code sent a healthy prompt once and recovered a silent turn.

Closes #11620

Agent: gpt-6.2-sol (effort: medium) via Codex

{"version":1,"head":"aab87273d0ab5e16d2248fe230d6c88e1131b052","base":"af40561564d27af9010b1bce02decca287ad2c09","read":["impact"]}
{"path":"packages/daemon/src/lib/agent/agent-session.ts","reason":"Checked delivery admission and its failed-status events."}
{"path":"packages/daemon/src/lib/agent/event-subscription-setup.ts","reason":"Checked that query.trigger still dispatches automatic turn-end replay."}
{"path":"packages/daemon/src/lib/agent/interrupt-handler.ts","reason":"Checked interrupt status events and query.trigger emission."}
{"path":"packages/daemon/src/lib/agent/model-switch-handler.ts","reason":"Checked session.updated on model switch and rollback."}
{"path":"packages/daemon/src/lib/agent/processing-state-manager.ts","reason":"Checked persisted processing-state updates and event payloads."}
{"path":"packages/daemon/src/lib/agent/query-lifecycle-manager.ts","reason":"Checked failed-delivery status and the resume-choice message delta."}
{"path":"packages/daemon/src/lib/agent/query-mode-handler.ts","reason":"Checked deferred and enqueued status publication during replay."}
{"path":"packages/daemon/src/lib/agent/query-runner.ts","reason":"Checked OXAP submitted and failed status publication."}
{"path":"packages/daemon/src/lib/agent/sdk-runtime-config.ts","reason":"Checked context.updated emission and runtime-setting updates."}
{"path":"packages/daemon/src/lib/agent/session-config-handler.ts","reason":"Checked session.updated after a config write."}
{"path":"packages/daemon/src/lib/mailbox/cancellation.ts","reason":"Checked failed status publication after mailbox cancellation."}
{"path":"packages/daemon/src/lib/mailbox/deferred-replay-scheduler.ts","reason":"Checked the scheduler's query.trigger publication."}
{"path":"packages/daemon/src/lib/mailbox/registration.ts","reason":"Checked the mailbox's failed and deferred message-status publishers."}
{"path":"packages/daemon/src/lib/neo/service.ts","reason":"Checked Neo's message-status refresh, SDK message subscriptions, and query-error wake."}
{"path":"packages/daemon/src/lib/oxap/oxap-codex-login.ts","reason":"Checked session-scoped SDK deltas for Codex login."}
{"path":"packages/daemon/src/lib/oxap/oxap-notice.ts","reason":"Checked the SDK delta carrying OXAP notices."}
{"path":"packages/daemon/src/lib/rpc-handlers/family-operations/session.ts","reason":"Checked session.updated publication for runtime settings."}
{"path":"packages/daemon/src/lib/rpc-handlers/index.ts","reason":"Checked session.updated publication for tool preferences."}
{"path":"packages/daemon/src/lib/rpc-handlers/session-handlers.ts","reason":"Checked explicit remove, defer, and retry status events."}
{"path":"packages/daemon/src/lib/session/message-persistence.ts","reason":"Checked status publication after persistence and on send failure."}
{"path":"packages/daemon/src/lib/session/session-lifecycle.ts","reason":"Checked session.updated payloads for persisted session edits."}
{"path":"packages/daemon/src/lib/session/session-manager.ts","reason":"Checked failed status publication during delivery cleanup."}
{"path":"packages/daemon/src/lib/state-projection-service.ts","reason":"Checked the session.updated and session.error projection subscribers."}
{"path":"packages/space/src/rpc/space-setup.ts","reason":"Checked message status forwarding in Space RPC wiring."}
{"path":"packages/space/src/runtime/space-runtime.ts","reason":"Checked the Space SDK tool-use recovery subscriptions for the reported SDK message link."}
{"path":"packages/space/src/runtime/task-agent-manager.ts","reason":"Checked delivery status forwarding and task waiters for session updates and errors."}
{"path":"packages/web/src/components/MessageInput.tsx","reason":"Checked queue refreshes triggered by messages.statusChanged."}
{"path":"packages/web/src/components/space/useTargetSessionContext.ts","reason":"Checked context.updated filtering by session channel."}
{"path":"packages/web/src/lib/session-store.ts","reason":"Checked the context.updated subscriber and its push version tracking."}

lsm added 2 commits November 23, 2026 21:00
Exercise the chat and native adapter across the silence deadline so duplicate submissions and transcript changes are observable.
OXAP acknowledges native turns before delivering events. Reopening accepted prompts through the SDK silence watchdog starts duplicate native turns and changes transcript order.
@hyperneo-ai-test

hyperneo-ai-test Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Review status

# engine commit started (UTC) dur P0/P1/P2 verdict
1 claude-code (glm-5.3) 9695941 11-24 02:07 35m2s —/—/— failed
2 claude-code 9695941 11-24 02:42 3s —/—/— failed
3 claude-code 9695941 11-24 02:55 3s —/—/— failed
4 claude-code (glm-5.3) 9695941 11-24 03:25 25m40s —/—/— superseded
5 claude-code (glm-5.3) 295680c 11-24 03:51 19m1s 0/0/0 approved
6 claude-code (glm-5.3) 815f0f5 11-24 04:17 37m15s —/—/— failed
7 claude-code (glm-5.3) 815f0f5 11-24 05:03 1h25m —/—/— failed
8 claude-code (glm-5.3) 815f0f5 11-25 06:30 52m27s 0/0/1 changes
9 — 815f0f5 11-25 07:22 — —/—/— queued
SUM 4h14m 0/0/1 queued

@lsm

lsm commented Nov 24, 2026

Copy link
Copy Markdown
Owner Author

@hyperneo-ai-test review 9695941

2 similar comments
@lsm

lsm commented Nov 24, 2026

Copy link
Copy Markdown
Owner Author

@hyperneo-ai-test review 9695941

@lsm

lsm commented Nov 24, 2026

Copy link
Copy Markdown
Owner Author

@hyperneo-ai-test review 9695941

Preserve the image wording scenario and the native Codex replay proof in the shared fixture.

@hyperneo-ai-test hyperneo-ai-test Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

Engine claude-code (glm-5.3) · Reviewed commit 295680c · Trigger: mention+push
Prompt arm: fable-2

Keep both replay and chat continuity coverage in the shared fixture.
@lsm

lsm commented Nov 24, 2026

Copy link
Copy Markdown
Owner Author

@hyperneo-ai-test review 815f0f5

1 similar comment
@lsm

lsm commented Nov 24, 2026

Copy link
Copy Markdown
Owner Author

@hyperneo-ai-test review 815f0f5

@lsm

lsm commented Nov 25, 2026

Copy link
Copy Markdown
Owner Author

@hyperneo-ai-test Please re-review head 815f0f5

@lsm

lsm commented Nov 25, 2026

Copy link
Copy Markdown
Owner Author

@hyperneo-ai-test review 815f0f5

@hyperneo-ai-test hyperneo-ai-test Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requires changes.

Engine claude-code (glm-5.3) · Reviewed commit 815f0f5 · Trigger: mention

The restarted daemon owns a separate event bus. Listen on both buses so the replay proof catches delivery errors after restart.
@lsm

lsm commented Nov 25, 2026

Copy link
Copy Markdown
Owner Author

@hyperneo-ai-test review aab8727

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.

OXAP chats can deliver answered prompts again

1 participant