Skip to content

Connections follow-ups: restart detection, hide disconnected agent history, more apps - #90

Merged
KAVentures merged 1 commit into
mainfrom
fix/connections-followups
Sep 27, 2026
Merged

KAVentures merged 1 commit into
mainfrom
fix/connections-followups

Conversation

@KAVentures

Copy link
Copy Markdown
Owner

Problems (reported on a real install)

  1. Codex Observe on, but no Codex runs ever appear. On the reporting machine the DB has 0 Codex events. Codex's own log (~/.codex/logs_2.sqlite) shows only HttpMetricsClient exports, no trace or log exports. The Codex engine inside the ChatGPT app (ChatGPT.app/Contents/Resources/codex app-server) had been running since Sep 17, and it builds OTel exporters only at startup. Context worked because MCP servers are spawned per chat. The UI said "takes effect the next time Codex starts", which reads as "next chat".
  2. Agents tab kept showing old Claude Code runs after Observe was turned off. These are stored history (recorded before the one-click flow existed); the view just never filtered it.
  3. Requests for more apps: Microsoft Copilot, Lovable, etc.

Changes

  • Restart detection (server/connections.py): a target can declare a process matcher. If a matching process started before OpenWorkGraph installed the config, status includes restart_needed: {app, running_since}, and the row says Quit and reopen the ChatGPT app (⌘Q) to finish turning on Observe (running since 17 Sep).
    • Applies to Codex Observe and Claude Desktop Context.
    • The install time is recorded on install, falling back to the newest *.owg-backup-* (written right before every managed change), so installs from earlier versions are covered.
    • The process list is cached for 4 s.
    • Codex Context no longer declares a restart.
  • Agents history filter: /v1/agent-execution-traces?hide_disconnected=true drops agent rows whose framework maps to a client with Observe off or not installed, and returns hidden_frameworks. Both Agents-tab scripts (agent_observability_v090.js, v0571_polish.js) use the same param, since one patches rows the other renders, and both refresh on toggle. There's a Show past runs from agents whose Observe is off checkbox (stored per browser) and a note naming what's hidden. Nothing is deleted.
  • More apps: GitHub Copilot CLI (~/.copilot/mcp-config.json, type: local, tools: ["*"]), Kiro (~/.kiro/settings/mcp.json), Amazon Q Developer (~/.aws/amazonq/mcp.json). VS Code is relabelled VS Code + GitHub Copilot (Copilot agent mode reads the same mcp.json).
    • Cloud apps (ChatGPT, Lovable, Microsoft 365 Copilot) accept only remote HTTP MCP servers, so they can't reach a local OWG. The panel says so and links to the tunnel guidance, instead of pretending they're one-click.

Verification

  • tests/test_connections_followups_v092.py (8): native formats for the three new clients; restart-needed appears for an older engine and clears for a newer or absent one; backup-time fallback; matcher ignores Claude helpers, Claude Code CLI and codex-code-mode-host; hidden_frameworks follows the switch; route hides Claude Code history only with hide_disconnected while keeping a custom agent.
  • JS 49/49 (incl. both Agents scripts using the same filtered URL); check_injected_dashboard_js.py OK.
  • Full pytest: 628 passed, 1 failed (pre-existing env-path test_v49…no_long_lived_mcp_bearer).
  • Read-only check against the real install: Codex Observe reports restart_needed: the ChatGPT app, running since 2026-09-17; hidden_frameworks == {claude-code}.
  • Browser (throwaway server, fake home, real process list):
    • The Codex row shows the quit-and-reopen message.
    • The Agents tab hides a Claude Code run after Observe was switched off via the CLI, shows Past runs from Claude Code are hidden…, and shows the run again when ticked.

Not included: version bump; per-agent history deletion (the existing delete is time-range based and also removes desktop evidence).

… more apps

- Detect when an app has not restarted since OpenWorkGraph changed its
  config (Codex engine for Observe, Claude Desktop for Context) and tell
  the user to quit and reopen it. The ChatGPT app keeps its Codex engine
  running for days, so Codex Observe silently never started exporting.
  Install time is recorded, falling back to the newest managed backup.
- Agents tab hides stored runs from agents whose Observe is off or
  removed (server-side hide_disconnected filter shared by both Agents
  scripts), with a toggle to show them and a note saying what is hidden.
  Nothing is deleted.
- Add GitHub Copilot CLI, Kiro and Amazon Q Developer; label VS Code as
  'VS Code + GitHub Copilot'. Explain that cloud apps (ChatGPT, Lovable,
  Microsoft 365 Copilot) need a tunnel.
- Codex Context no longer claims it needs a restart: Codex reloads MCP
  servers for new chats.
@KAVentures
KAVentures merged commit cc3069c into main Sep 27, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant