agent-orchestrator/docs
Harshit Singh Bhandari 14c2c485be
fix(desktop): recover login-shell env so the daemon finds zellij/credentials (#389)
* fix(desktop): recover login-shell env so the daemon finds zellij/credentials

A Finder/Dock launch starts the app via launchd, not a login shell, so
~/.zprofile and ~/.zshrc are never sourced. The daemon then inherits
launchd's minimal env (no /opt/homebrew/bin on PATH, no exported
ANTHROPIC_API_KEY, etc.), cannot exec zellij/git, and its agents cannot
authenticate. Launching from a terminal masked this because the shell had
already populated the env, so it only reproduced on a real Finder/Dock launch.

Resolve the login-shell environment once at startup
($SHELL -ilc "printf sentinel; env -0"), adopt it as the base for
daemonEnv(), and force PATH from the shell with a static floor when the probe
fails (timeout/non-zero exit). The probe never blocks startup (3s SIGKILL
timeout, stdin closed) and degrades to the floor rather than erroring.

Windows keeps its existing behavior: its env comes from the registry/session
and is inherited by GUI-launched apps, so this bug does not exist there.

Pure parse/merge logic lives in shared/shell-env.ts (no node:* imports, per
the daemon-attach.ts convention) with unit tests; main.ts owns the real spawn.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: format with prettier [skip ci]

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-06-23 02:28:12 +05:30
..
agent fix(sessions): stop AO hook files from making every worktree permanently dirty (#169) 2026-06-11 11:06:45 +05:30
cli feat(frontend): add live browser panel (#375) 2026-06-22 04:14:18 +05:30
README.md docs: refocus README on the product, move progress to docs/STATUS.md (#311) 2026-06-18 15:43:41 +05:30
STATUS.md feat: add desktop notifications v1 (#262) 2026-06-22 01:14:04 +05:30
architecture.md docs: sync documentation with current state of main (#228) 2026-06-14 18:42:18 +05:30
backend-code-structure.md docs: sync documentation with current state of main (#228) 2026-06-14 18:42:18 +05:30
daemon-environment.md fix(desktop): recover login-shell env so the daemon finds zellij/credentials (#389) 2026-06-23 02:28:12 +05:30
stack.md docs: refocus README on the product, move progress to docs/STATUS.md (#311) 2026-06-18 15:43:41 +05:30

README.md

agent-orchestrator rewrite docs

The agent-orchestrator is being rebuilt as a long-running Go backend daemon
(backend/) plus an Electron + TypeScript frontend (frontend/). The backend
supervises coding-agent sessions and exposes daemon control, project/session
state, terminal streaming, and CDC/event infrastructure.

Start with architecture.md for the current backend model and
cli/README.md for the CLI surface.

Reference docs

Doc What it covers
architecture.md Current backend model, package layout, status derivation, persistence/CDC, and load-bearing rules.
backend-code-structure.md Package ownership rules for the Go backend: domain, services, ports, adapters, storage, HTTP, CLI, and daemon wiring.
cli/README.md CLI commands and daemon control surface.
agent/README.md Agent adapter contract, hook methodology, and session-info derivation.
STATUS.md What is shipped on main today and what is still in flight.
stack.md Accepted library/runtime choices, pending stack decisions, and dependencies explicitly avoided for V1.

Mental model

Persist durable facts, derive display status:

  • session table: activity_state, is_terminated, identity, metadata
  • PR tables: PR/CI/review facts
  • derived read model: service.Session computes display status from session + PR facts