Skip to content

Dwight (assistant agent) not created on startup in 0.2.4, Enrich button missing #58

@billrehm

Description

@billrehm

What happened?

On 0.2.4, the assistant agent (Dwight) is not created at startup and the global Enrich toggle button is not visible in the UI. This is consistent across two Windows machines and occurs regardless of whether the .exe wrapper workaround is used.

Per the 0.1.5 changelog, Dwight was added as "a persistent, visible assistant agent (Sonnet, 1M context) [that] spawns on startup" with "a global enrich toggle [that] routes Michael's queued prompts through Dwight first." The enrichMessage API is still present in the preload surface (src/preload/index.ts). No changelog entry between 0.1.5 and 0.1.8 (the last documented version) mentions removing Dwight or the Enrich feature. Version 0.2.4 is not documented in the changelog.

Root cause identified: Dwight's session died approximately 37 hours ago during an app restart (lastSeen: 1780882806746). The app did not respawn the assistant agent on subsequent launches. registry.json retained assistant.archived: false, so from the registry's perspective Dwight was still a live, non-archived agent, but no PTY session was ever re-created for him.

When the assistant agent's session dies during a restart, the app should either respawn it on next launch (since it's defined as a persistent agent that "spawns on startup") or archive the dead entry. Currently it does neither, leaving a ghost entry in the registry that the circuit breaker then targets (see separate breaker issue).

Workaround applied: Setting assistant.archived: true in registry.json causes fleet.json to drop the assistant entry on its next regeneration. This stops the breaker from targeting it (after an app restart, since the breaker caches the roster in memory). However, this does not bring Dwight back or restore the Enrich toggle.

Question for @chaitanyagiri: Is the assistant agent supposed to be respawned on every app launch (as the 0.1.5 changelog implies), or was it intentionally made non-persistent in a later version? If the former, the respawn logic is broken on Windows. If the latter, stale entries should be cleaned up.

Steps to reproduce

  1. Install Munder Difflin 0.2.4 on Windows 11.
  2. Launch the app (with or without the .exe wrapper).
  3. Observe: Michael (GOD) is created and appears on the floor. Dwight does not appear.
  4. Look for the Enrich toggle in the message queue / command bar area. It is not present.
  5. Check fleet.json for the assistant entry from a prior version. It persists with stale data.

Logs / screenshots

registry.json assistant entry (session dead, not archived):
json{
  "id": "assistant",
  "isAssistant": true,
  "archived": false,
  "lastSeen": 1780882806746
}

fleet.json assistant entry (stale, generated from dead registry entry):
json{
  "id": "assistant",
  "isAssistant": true,
  "tokens": 0,
  "usd": 0,
  "lastTool": null,
  "lastActiveSecAgo": null,
  "inboxBacklog": 0,
  "breaker": "constrained"
}

The breaker: "constrained" status was set by the circuit breaker firing on this stale entry (documented in separate issue).

macOS version

Windows 11 (Azure Virtual Desktop, build 10.0.26200.8457) and Windows 11 (physical laptop). Reproduced on both.

Node version

v24.13.0

Claude Code version (if relevant)

v2.1.126

Pre-flight

  • I re-ran npm install so node-pty is rebuilt for the current Electron ABI.
  • I searched existing issues and this isn't a duplicate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions