Skip to content

fix(cli): lifecycle never started, silent 5s spawn freeze, and wrong agent plugin in status #239

@suraj-markup

Description

@suraj-markup

Summary

Three independent CLI/lifecycle bugs:

BUG-17 — Lifecycle manager never started by ao start

createLifecycleManager() exists and has a start(intervalMs) method but ao start never calls it. CI failure reactions, PR merge detection, notifications — none of these work. The orchestrator is a session launcher with zero automation.

Fix: In start.ts, after starting the dashboard server:
```typescript
const lifecycle = createLifecycleManager(deps);
lifecycle.start(30_000);
process.on("SIGINT", () => { lifecycle.stop(); process.exit(0); });
```

File: packages/cli/src/commands/start.ts


BUG-26 — ao spawn silently freezes for 5 seconds after "Session created"

After printing "✓ Session created", spawn waits a hardcoded 5 seconds before sending the post-launch prompt. No spinner or message. The CLI appears hung.

Fix: Show a spinner: "Waiting for agent to start…" with elapsed time during the wait.

File: packages/core/src/session-manager.ts line 577


BUG-27 — ao status always uses claude-code plugin for introspection

When running without a config, ao status hardcodes getAgentByName("claude-code"). Codex sessions get introspected with the Claude Code plugin, which finds nothing in ~/.claude/projects/. Summary shows blank.

Fix: Read the agent field from session metadata and select the matching plugin.

File: packages/cli/src/commands/status.ts line 308


Acceptance criteria

  • Starting ao start and merging a PR triggers a notification (lifecycle is running)
  • ao spawn shows a spinner during the 5s startup wait
  • ao status shows correct summary for Codex sessions

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions