Skip to content

feat: wait for voice-note transcriptions before agent turns - #83

Draft
dimavrem22 wants to merge 6 commits into
mainfrom
feat/voice-note-transcriptions
Draft

dimavrem22 wants to merge 6 commits into
mainfrom
feat/voice-note-transcriptions

Conversation

@dimavrem22

@dimavrem22 dimavrem22 commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Executive Summary

Wait for voice-note transcription before waking Codex, while retaining the original attachment fallback.

  • Automatically subscribe to MMS, iMessage, and WhatsApp transcription completion.
  • Wait up to 60 seconds, then make one bounded message read before continuing.
  • Bump the plugin to 0.2.36.

Description

One subscription to message.transcription_finished covers MMS, iMessage, and WhatsApp. The receiver matches data.channel and data.message_id to the original waiting message; a completion does not create another turn.

Managed deliveries use the already-resolved voice-note result without a second wait. Standalone delivery retains its 60-second completion wait and single bounded read. Signed attachment transcript metadata survives URL refresh.
Pending audio receipts are persisted and acknowledged immediately. A matching completion notification updates the same original message rather than creating another turn. A background consumer resumes the existing channel handler when every transcription is terminal, or after the original 60-second deadline plus one bounded read. Ordered conversation consumers use the same resolution path after their existing durable admission.

Generated speech is explicitly labeled as a voice-note transcript, separate from typed text. Original attachments, sender text, reply destinations, and existing session admission remain intact; unavailable transcripts continue through the previous attachment-handling path.

Reason

Agents should understand voice notes without racing their transcription or answering twice when completion arrives later.

Decisions

  • Stack base: Rebased onto current origin/main; no deployments are included.
  • Version: 0.2.43, exactly one patch above the upstream version 0.2.42.
  • Bounded wait: Wait at most 60 seconds for completion, then read once with a 10-second deadline so unavailable transcription cannot prevent the original message from being handled.
  • Receipt ownership: Persist original input before acknowledging it and retain its deadline over shutdown; callbacks alone never create agent work.
  • Compatibility: Use the existing authenticated SDK transport for the additive read fields, retaining compatibility with the supported released SDK floor.
  • Source clarity: Keep generated transcript text out of typed-message control and mention handling, and retain original media processing on failure.

Testing

  • Fable and Opus reviewed the prior transcription implementation; those reviews predate the unified webhook change.

  • Unified webhook head: 01c8e3680. GitHub checks for this PR. No live-environment verification or rollout.

  • Local verification is static only: applicable lint/format, syntax and diff checks. No local tests or CI-equivalent builds were run.

  • Regression coverage includes pending completion, timeout fallback, restarts, source-bound metadata and no second hosted wait where applicable.

  • No deployments, live-message sends, shared-database mutations or package publication are included.

Related PRs


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@dimavrem22
dimavrem22 force-pushed the feat/voice-note-transcriptions branch from c219b98 to 026febe Compare November 18, 2026 03:00
@dimavrem22
dimavrem22 changed the base branch from main to feat/remote-tool-catalog November 18, 2026 03:00
Base automatically changed from feat/remote-tool-catalog to main November 18, 2026 05:06
@dimavrem22
dimavrem22 force-pushed the feat/voice-note-transcriptions branch from 026febe to 02d2afb Compare November 18, 2026 08:03
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.

1 participant