How devagentforge/open-claude-cowork works
Open Claude Cowork is an Electron desktop assistant for programming, file management, and other prompted tasks. A user chooses a working directory and prompt; the desktop process creates a session, runs Claude, streams events back to the interface, and persists session history. The interface also supports session management, tool-result inspection, permission decisions, and API configuration. The graph follows documented product capabilities, but unsampled modules are connected only where the available excerpts or README support their role.
Main entry points: App.tsx Application UI · main.ts Electron main · useIPC.ts IPC hook · ipc-handlers.ts IPC handlers
Components 21
Desktop runtime
- Electron main
src/electron/main.ts - Preload bridge
src/electron/preload.cts
Session execution
- IPC handlers
src/electron/ipc-handlers.ts - Claude runner
src/electron/libs/runner.ts - Session store
src/electron/libs/session-store.ts - Session database
src/electron/libs/session-store.ts
Assistant interface
- Application UI
src/ui/App.tsx - IPC hook
src/ui/hooks/useIPC.ts - UI session state
src/ui/store/useAppStore.ts - Session setup
src/ui/components/StartSessionModal.tsx - Message cards
src/ui/components/EventCard.tsx - Permission decisions
src/ui/components/DecisionPanel.tsx - Prompt input
src/ui/components/PromptInput.tsx - Message history window
src/ui/hooks/useMessageWindow.ts - Markdown renderer
src/ui/render/markdown.tsx - Settings dialog
src/ui/components/SettingsModal.tsx
Configuration
- Claude settings
src/electron/libs/claude-settings.ts - API config storage
src/electron/libs/config-store.ts
Other components
- Desktop user
- Claude Agent SDK
- Local working directory
Connections 23
- Desktop user → Application UI: uses
- Application UI → IPC hook: subscribes and sends
- Application UI → UI session state: updates session state
- Application UI → Session setup: opens setup
- Application UI → Prompt input: renders input
- Application UI → Message history window: windows history
- Application UI → Message cards: renders messages
- Message cards → Permission decisions: offers decisions
- Message cards → Markdown renderer: renders content
- IPC hook → Preload bridge: sends and receives
- Preload bridge → Electron main: forwards IPC
- Electron main → IPC handlers: dispatches events
- IPC handlers → Session store: reads and updates
- IPC handlers → Claude runner: starts and controls
- Claude runner → Claude Agent SDK: runs agent
- Session store → Session database: persists history
- Electron main → Claude settings: reads configuration
- Electron main → API config storage: saves API config
- Application UI → Settings dialog: opens settings
- Settings dialog → IPC hook: requests config
- Session setup → IPC hook: selects directory
- Session setup → Local working directory: chooses working path
- Claude runner → Local working directory: works in directory