Cory Policht
← Back to the Devlog
DEVLOG · 2026-07-03 .. 2026-07-06 · BUILD

Echo planning loop and mobile voice client.

While the backend platform cuts 1.0, Echo reaches its own milestone: the mobile app implementation and mini ADP planning loop close together, backed by non-blocking JNI Whisper inference and the v0.9.0 pre-ship tag.

WINDOW
Start2026-07-03
End2026-07-06
Kindbuild
Projectsecho-agent-orchestration
Delivered
  • echo-agent-orchestration
    Non-blocking JNI inference and dynamic voice activity detection
    Moves native Whisper transcription off audio recording threads into non-blocking JNI execution, adding dynamic VAD threshold calculation and connection hysteresis preloading.
    echo · b5a3f8b
  • echo-agent-orchestration
    Runtime microphone permission checks for Foreground Services
    Verifies and requests runtime microphone permissions prior to promoting the audio service into an Android Foreground Service, preventing crash loops on modern Android versions.
    echo · e038002
  • echo-agent-orchestration
    Wake-word activation gate and interactive client speech flow
    Wires the on-device 'echo' wake-word detector, speech-to-text task extraction, and synthesized speech responses into a cohesive voice loop.
    echo · c7b4c3becho · 1d2dc2c
  • echo-agent-orchestration
    Native Whisper NDK compilation macro alignment
    Defines the WHISPER_VERSION compilation macro explicitly within the NDK build harness to avoid undefined behavior during native binary compilation.
    echo · 1d03135
  • echo-agent-orchestration
    Planning loop domain models, UI screens, and pre-ship tag
    Closes Echo-E7 (Mini ADP Planning Loop) and Echo-E8 (Mobile App Implementation), hardens authentication and server sync, and cuts the v0.9.0-pre-ship release candidate.
    echo · a499a32echo · 97f12aeecho · v0.9.0-pre-ship

While the rest of the developer ecosystem was coordinating its 1.0 release wave, Echo was focused on a distinct mobile and on-device milestone. Between July 3 and July 6, two major epics reached done—Echo-E7 (the Mini ADP Planning Loop) and Echo-E8 (Mobile App Implementation)—culminating in the v0.9.0-pre-ship release candidate tag.

The technical challenge for Echo was bridging native C++ machine learning libraries with Android platform lifecycle constraints. The application relies on on-device Whisper models running through native NDK binaries for local speech recognition. PRs and commits early in the window sorted out brittle build seams, such as injecting the missing WHISPER_VERSION macro (1d03135) so CMake would compile cleanly across all target architectures.

More critical was real-time performance on device. Early iterations performed voice activity detection (VAD) and Whisper model execution too close to the microphone recording loop, causing audio buffer dropouts and lag. Commit b5a3f8b restructured the pipeline into non-blocking JNI workers with dynamic VAD thresholding and connection hysteresis preloading, keeping audio capture smooth while inference runs asynchronously in the background.

Operating system permissions created another subtle failure mode. On modern Android versions, promoting an audio recording service to a Foreground Service (FGS) without verified microphone permissions causes an immediate fatal SecurityException. Commit e038002 established strict runtime permission checks before triggering the foreground service promotion.

With audio capture and inference stable, the higher-level agent loops fell into place. The on-device wake-word gate (‘echo’) was connected to the full voice flow (c7b4c3b), routing speech-to-text into task extraction models and dual-gate sync (1d2dc2c). In the UI, the planning domain models and task review screens landed (fe733eb, a499a32), allowing an engineer to review and approve plan steps derived from voice input.

With authentication and sync hardened against the 1.0 platform contracts (97f12ae), Echo cut v0.9.0-pre-ship. It proved that the autonomous planning loop could live outside a desktop browser on real hardware.

Lessons learned

  • Runtime permissions must precede Android Foreground Service activation. Starting a Foreground Service with the microphone type requires that the app has already been granted runtime RECORD_AUDIO permissions; invoking startForeground while permission is pending immediately crashes the process.
  • Native audio inference through JNI must never share execution threads with audio capture. Running model inference on or directly blocking the audio recording callback guarantees buffer underruns. Offloading audio slices onto dedicated worker queues with hysteresis buffers keeps recording seamless.
  • Decouple speech transcription from state-mutating planning operations. Voice transcriptions are inherently speculative until confirmed. Separating raw speech-to-text extraction from the domain planning mutations via dual client confirmation gates keeps bad transcriptions from corrupting server state.