> For the complete documentation index, see [llms.txt](https://ai-os-and-trend-finder.gitbook.io/ai-os-and-trend-finder-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ai-os-and-trend-finder.gitbook.io/ai-os-and-trend-finder-docs/.spec_system/archive/phases/phase_40/session_16_voice_parity_and_broker_respawn.md).

# Session 16: Voice Parity And Broker Respawn

**Session ID**: `phase40-session16-voice-parity-and-broker-respawn` **Status**: Not Started **Estimated Tasks**: \~12-25 **Estimated Duration**: 2-4 hours

***

## Objective

Verify the upstream no-unnecessary-reprompt outcome while preserving AI OS environment-backed voice secret handling.

***

## Scope

### In Scope (MVP)

* Compare upstream browser saved-key reuse with current AI OS environment-backed broker startup.
* Confirm `/__start_voice` still accepts an empty request body and reads provider config from local environment sources such as `OPENAI_API_KEY` and optional `OPENAI_BASE_URL`.
* Verify error distinctions for missing key, invalid token, health timeout, provider/session failure, and broker-down states.
* Keep the existing `/__start_voice` retry-before-error flow and fix only if tests reveal a broker-down regression when safe local provider config exists.
* Preserve Session 08 broker ownership and Session 09 Intelligence portal ownership caveats in code comments and docs updates.
* Keep browser-supplied provider keys and browser localStorage key persistence out of AI OS unless a separate security decision changes the policy.

### Out of Scope

* Browser localStorage persistence for provider keys.
* Accepting provider keys in `/__start_voice` request bodies.
* Broad Intelligence portal feature work.

***

## Prerequisites

* [ ] Session 01 voice and control-plane invariants are recorded.

***

## Deliverables

1. Voice parity audit result and any necessary hook/bridge fixes.
2. Tests in the existing voice bridge, hook, and Intelligence portal suites where each behavior is owned.
3. Documentation notes queued for Session 17.

***

## Success Criteria

* [ ] Broker-down plus locally configured provider key can respawn without an unnecessary setup reprompt if current behavior was missing that path.
* [ ] Missing key still opens setup/error state.
* [ ] Browser-supplied keys remain rejected.
* [ ] Token failures remain distinguishable from provider/session failures.

***

## Folded Source Session Split

The section below preserves the original Phase 40 session split detail for this session, including dependencies, decisions, outputs, and acceptance checks.

### Session 16: Voice Parity And Broker Respawn

**Objective**: Verify the upstream no-unnecessary-reprompt outcome while preserving AI OS environment-backed voice secret handling.

**Scope**:

* Compare upstream browser saved-key reuse with current AI OS environment-backed broker startup.
* Confirm `/__start_voice` still accepts an empty request body and reads provider config from local environment sources such as `OPENAI_API_KEY` and optional `OPENAI_BASE_URL`.
* Verify error distinctions for missing key, invalid token, health timeout, provider/session failure, and broker-down states.
* Keep the existing `/__start_voice` retry-before-error flow. Fix only if tests reveal a broker-down regression when safe local provider config exists.
* Preserve Session 08 broker ownership and Session 09 Intelligence portal ownership caveats in code comments and docs updates.
* Keep browser-supplied provider keys and browser localStorage key persistence out of AI OS unless a separate security decision changes the policy.

**Outputs**:

* Voice parity audit result and any necessary hook/bridge fixes.
* Tests in existing voice bridge, hook, and Intelligence portal component suites where the behavior is owned.
* Documentation notes queued for Session 17.

**Dependencies / Notes**:

* Depends on Session 01.
* Can run independently of most Hermes chat and Ministry work.
* Decision: AI OS continues to prefer local environment-backed provider configuration over browser key persistence.

**Acceptance Checks**:

* Broker-down plus locally configured provider key can respawn without an unnecessary setup reprompt if current behavior was missing that path.
* Missing key still opens setup/error state.
* Browser-supplied keys remain rejected.
* Token failures remain distinguishable from provider/session failures.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ai-os-and-trend-finder.gitbook.io/ai-os-and-trend-finder-docs/.spec_system/archive/phases/phase_40/session_16_voice_parity_and_broker_respawn.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
