* fix(claude): state why a permission prompt appeared ### Linked issue Closes # No open issue tracks this. The behavior appeared in a live session on a remote host. ### Type of change - [x] Bug fix - [ ] New feature - [ ] Enhancement - [ ] Refactor - [ ] Docs ### Reasoning A user selects Bypass and expects no prompts. A `permissions.ask` rule or a `PreToolUse` hook outranks the mode, so the agent asks anyway, and the card gives no cause. The user reads this as a broken mode. Claude explains each prompt in `canUseTool`'s `decisionReason`. Paseo dropped it. The card now shows that sentence, so a user can find the hook that owns the rule instead of guessing. Codex already puts its approval reason in `description`. Claude now matches, so no new field and no protocol change are needed. `description` was unset on every Claude permission request except `AskUserQuestion`, which keeps its own summary because that spread still runs after this line. ### Goals - The card shows the provider's reason when the provider sends one. Acceptance: a hook-forced prompt in Bypass shows the hook's `permissionDecisionReason`. - A card without a reason looks exactly as it does today. Acceptance: no new row, no layout shift. - Claude and Codex carry an approval reason the same way. Acceptance: one field, no provider-specific rendering. ### Non-goals - Changing the CLI's precedence. A hook that asks still asks. Paseo shows the cause; it does not overrule the hook. - Auto-approving hook-forced tools in Bypass. `f998ee169` did that and was reverted the same day. A blanket allow defeats a real safety hook. ### QA Real Claude, web (browser), one live session in `bypassPermissions`, driven through the app by Playwright. ``` npx playwright test --project=real-provider e2e/browser/permission-reason-card.real.spec.ts 1 passed (52.7s) ``` The run forces two prompts in the same session and captures both. Forced by a `permissions.ask` rule, which sends no reason. This is the card before this change:  Forced by a `PreToolUse` hook that returns a reason, same session:  The spec asserts both states, so the screenshots are not the only proof: the hook's sentence is absent from the first card and visible on the second. Both cards come from one session on this branch. The pair shows the two render paths, with a reason and without. It is not an old build beside a new one. A card without a reason renders exactly as it did before this change, which is why the first shot stands in for the old card. The spec lives at `packages/app/e2e/browser/permission-reason-card.real.spec.ts`. It is not part of this commit. Unit: ``` npx vitest run packages/server/src/server/agent/providers/claude/agent.test.ts Test Files 1 passed (1) Tests 75 passed (75) ``` Platforms: the daemon fills a field the card already rendered, so every platform gets it through the existing path. Web verified above with real Claude. ### Checklist - [x] One focused change - [x] `npm run typecheck` passes - [x] `npm run lint` passes - [x] `npm run format` passes - [x] QA evidence - [x] Tests added or updated where it made sense Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix: preserve context for Claude permission reasons --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-authored-by: Mohamed Boudra <boudra.moha@gmail.com>
Voice Assistant
A voice-controlled terminal assistant that runs as a single local service.
Quick Start
# Install dependencies
npm install
# Copy environment variables
cp .env.example .env
# Edit .env and add your API keys (OpenAI, Deepgram)
# Run development servers
npm run dev
# Open browser to http://localhost:5173
Architecture
- Express Server (port 3000) - Serves API and built UI in production
- Vite Dev Server (port 5173) - Hot-reload React UI in development
- WebSocket (
/ws) - Real-time bidirectional communication - Agent - STT → LLM → TTS pipeline with terminal control
- Daemon - tmux-based terminal management (in-process)
Development
# Run both servers (recommended)
npm run dev
# Or run separately:
npm run dev:server # Express on port 3000
npm run dev:ui # Vite on port 5173
# Type checking
npm run typecheck
# Build for production
npm run build
# Start production server
npm start
Project Status
✅ Completed (Phases 1-2):
- Package setup and configuration
- Express server with WebSocket
- React UI with Vite
- WebSocket client with ping/pong testing
⏳ In Progress (Phase 3):
- Terminal control (tmux integration)
📋 Planned (Phases 4-9):
- LLM integration (OpenAI GPT-4)
- Agent orchestrator
- Speech-to-Text (Deepgram)
- Text-to-Speech (OpenAI)
- Audio streaming
- UI polish
See IMPLEMENTATION_PLAN.md for complete details.
Environment Variables
OPENAI_API_KEY=your-openai-key-here # GPT-4 and TTS
DEEPGRAM_API_KEY=your-deepgram-key-here # Streaming STT
STT_MODEL=whisper-1 # Optional: override to gpt-4o-transcribe, etc.
STT_CONFIDENCE_THRESHOLD=-3.0 # Optional: reject low-confidence clips
STT_DEBUG_AUDIO_DIR=.stt-debug # Optional: persist raw dictation audio for debugging
PASEO_HOME=~/.paseo # Runtime state directory (agents/, etc.)
PASEO_LISTEN=127.0.0.1:6767 # Listen address (host:port or /path/to/socket)
PASEO_HOME defaults to ~/.paseo and isolates runtime artifacts like agents/. PASEO_LISTEN controls the daemon listen address. For blue/green testing you can run a parallel server without touching production state:
PASEO_HOME=~/.paseo-blue PASEO_LISTEN=127.0.0.1:7777 npm run dev
Tech Stack
- Server: Express, TypeScript, ws (WebSocket)
- Client: React 18, Vite, TypeScript
- Terminal: tmux (via child_process)
- AI: OpenAI (LLM + TTS), Deepgram (STT)
Testing
Currently manual testing via:
- Start servers:
npm run dev - Open http://localhost:5173
- Test WebSocket connection (green status indicator)
- Click "Send Ping" button to test communication
More testing guidance as features are implemented.
License
MIT