Skip to content

Observal hook integration with Copilot CLI is broken end‑to‑end after CLI upgrade: stale module reference, fail‑closed timeout, and doctor doesn't detect it #1503

Description

@Lokesh7025

Checked for duplicates?

  • This issue is not a duplicate

What are the steps to reproduce this bug?

  1. Install observal-cli on a machine that previously had an older version that wrote Copilot CLI hooks (or run observal install then upgrade the CLI past the copilot_cli_hook →
    copilot_cli_session_push rename).
  2. Launch copilot from any directory and run any tool, e.g. gh issue list.
  3. Observe in ~/.copilot/logs/process-*.log:
    - No module named observal_cli.hooks.copilot_cli_hook (from ~/.copilot/settings.json entries).
    - preToolUse hook from "/home//.copilot/hooks/observal.json" execution failed (fail-closed): Hook command timed out after 5 seconds.
    - Tool calls denied with Denied by preToolUse hook from "/.../observal.json".
  4. Run observal doctor, observal doctor patch --all --harness copilot-cli --dry-run, and observal doctor cleanup --harness copilot-cli --dry-run.
    - doctor reports "All clear".
    - patch reports "Already up to date".
    - cleanup only lists ~/.copilot/hooks/observal.json and never mentions the stale settings.json entries.

Expected behaviour

  • CLI upgrades that rename hook modules must migrate existing references in ~/.copilot/settings.json (no orphaned copilot_cli_hook paths).
    • preToolUse telemetry hook should be fail‑open (or async/fire‑and‑forget) so slow/unreachable telemetry never blocks user tool calls; the 5 s timeout is too aggressive for a
      network call.
    • observal doctor should detect references to known‑removed module paths in any managed harness file (including settings.json) and offer to auto‑migrate them under --yes;
      cleanup should strip them too.

Support bundle

No response

(Optional) Anything else you want to share?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions