Skip to content

feat(voice): flash ⚡ / default / think 🧠 modes + consent-gated gmail send#191

Merged
AVADSA25 merged 1 commit into
mainfrom
feat/voice-modes
Jun 9, 2026
Merged

feat(voice): flash ⚡ / default / think 🧠 modes + consent-gated gmail send#191
AVADSA25 merged 1 commit into
mainfrom
feat/voice-modes

Conversation

@AVADSA25

@AVADSA25 AVADSA25 commented Jun 9, 2026

Copy link
Copy Markdown
Owner

What

Three modes on CODEC's live voice chat, same /voice interface — switch by saying "flash mode" / "think mode" / "normal mode" or via three new pills:

Mode Behavior
Flash Snappiest turns: 8-turn context, no per-turn memory/observer injection, 400-token cap, one-sentence answers, TTS 1.25× — same 35B model, pure prefill surgery
Default Byte-identical to today (suite-proven)
🧠 Think Live multi-step tool calling with spoken progress ("Using philips hue…"): lights, music, Chrome, web, calendar, gmail, iMessage, timers, reminders, weather, notes. Speak to interrupt; 6-tool/120s budgets; direct triggers keep the instant path

Safety

  • Curated allowlist for think-mode tools; terminal/python_exec/file_write/system/… hard-excluded, config-immune (test-pinned).
  • Gmail can now SEND — strictly consent-gated: draft read aloud, only the literal spoken word "send" sends (Step-3 strict consent); timeout / kill-switch / generic "yes" ⇒ fail closed, not sent (test-pinned). gmail.modify scope already authorized — no re-auth.
  • Kill switch VOICE_MODES_ENABLED=false; new voice_mode_changed audit event (AGENTS.md §6); tool calls ride the existing run_with_hooks audit/veto chokepoint.

Design + tests

  • Design doc: docs/VOICE-MODES-DESIGN.md (approved; decisions recorded).
  • TDD: 17 new tests written red-first. Full suite: 2391 passed, 0 failed. Manifest regenerated (PR-1A).
  • Deployed + serving on codec-dashboard (live).

🤖 Generated with Claude Code

Three modes on the live voice-to-voice chat, same interface
(docs/VOICE-MODES-DESIGN.md, operator-approved):

- flash: prefill-surgery for snappy turns — context trim 20→8 turns, skip
  per-turn memory + observer injections, max_tokens 2000→400, one-sentence
  rule, TTS 1.25x. Same local Qwen 35B.
- default: byte-identical to previous behavior.
- think: live multi-step tool calling — utterances route through a
  voice-scoped codec_agents.Agent over a curated allowlist (hue, music,
  chrome, web search/fetch, calendar, gmail, imessage, timers, reminders,
  weather, notes). Each tool call is narrated over TTS (extended-wait
  keepalive); speaking interrupts the loop; 6-tool + 120s budgets. Terminal/
  python_exec/file_write etc. are hard-excluded and config-immune. The
  single-skill fast path still fires first.

Switching: voice command ("flash/think/normal mode", terse-utterance guard so
"i think mode collapse…" can't hijack) + three UI pills on /voice + additive
WS {"type":"mode"} protocol. Kill switch VOICE_MODES_ENABLED. New audit event
voice_mode_changed (AGENTS.md §6 updated); think tool calls ride the existing
run_with_hooks audit chokepoint.

gmail: new consent-gated `send` action (think-mode "send an email" demo).
Strict Step-3 consent — CODEC reads the draft, only the literal spoken word
"send" sends; timeout/disabled/generic-yes fail CLOSED. gmail.modify scope
already covers send (no re-auth). Manifest regenerated (PR-1A).

Tests (TDD red-then-green): tests/test_voice_modes.py (11) +
tests/test_gmail_send.py (6). Full suite 2391 passed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@AVADSA25 AVADSA25 merged commit c37aa94 into main Jun 9, 2026
1 check passed
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.

2 participants