Skip to main content
Status: draft - recovered from Donna’s donna-rescue-uncommitted-2026-05-08T215800Z stash for Candi governance review. Treat as docs-mirror placeholder pending typed-artifact promotion under SPEC-078.

method.windows-codex-incident-activation

schema_version: 1
version: 1
id: method.windows-codex-incident-activation
title: "Windows/Codex Incident Activation"
status: draft
source_of_record: prism_typed_artifact
generated_mirror_paths:
  - docs/method-fragments/method.windows-codex-incident-activation.md
authority_layer: project
owning_specialization: governance
owner_identity: Candi
applies_to_specializations:
  - install
  - rte
  - engineering
  - governance
applies_to_surfaces:
  - codex
  - cursor
use_when:
  - "Windows/Codex work involves PowerShell launchers, .cmd wrappers, PATH resolution, or app-server startup."
  - "Work touches Codex loopback ports, stale process trees, app-server injection, or MCP config generation."
  - "Work involves prism install, npm, npx, editor-host setup, or Windows machine registration."
  - "Symptoms include repeated PeerJoined/PeerLeft, session flap, heartbeat, signal delivery, or MCP bootstrap failure."
  - "The operator correction says the issue is broader than a local file or shell problem."
skip_when:
  - "The task is a purely local Windows edit with no Prism lifecycle, signaling, MCP, install, launcher, or session-state symptom."
  - "A specific postmortem already exists for the exact recurrence and the current work only cites or resolves it."
  - "The operator explicitly narrows the task to read-only diagnosis and defers incident capture."
risk_tier_default: R2
risk_tier_override_allowed: true
required_context:
  - prior_postmortems
  - task_state
  - validation_result
expected_outputs:
  - "Failure class named in one sentence."
  - "Prism incident/RCA artifact created or explicitly linked."
  - "Exact persistence verified."
  - "Semantic recall checked with distinctive terms."
  - "Fix, containment, checkpoint, wrap, PR, or signal cites the artifact id."
required_prism_verbs:
  - prism_postmortem
  - prism_note
  - prism_diff
  - semantic_recall
  - prism_checkpoint
  - prism_wrap
  - prism_signal
review_gates:
  - governance
  - install
review_required: true
memory_writes:
  - incident_rca
  - validation_result
conflict_policy: "Incident-class classification routes to Candi; Windows install/launcher implementation routes to Lafonda; runtime smoke/release validation routes to Samantha."
telemetry_key: method.windows-codex-incident-activation
supersedes: []
superseded_by: []
source_refs:
  - SPEC-063 v0.2 RCA persistence rule
  - SPEC-078 Method Fragments
  - "Amanda/Codex repeated PeerJoined stale app-server process incident"

Purpose

Train new Windows/Codex agents to activate Prism governance before local host mechanics consume the whole task. This fragment exists because a new Windows/Codex agent can correctly fix a launcher or app-server issue while still missing the Prism lifecycle obligation: incident-class work is not complete until the incident or RCA is recorded and verified through Prism.

Trigger

Use this fragment before and during any Windows/Codex work involving:
  • coder.ps1, PowerShell launchers, .cmd wrappers, or Windows PATH resolution
  • Codex app-server startup, loopback ports, stale process trees, or app-server injection
  • prism install, npm, npx, MCP config generation, or editor-host setup
  • repeated PeerJoined / PeerLeft, session flap, heartbeat, signal delivery, or MCP bootstrap symptoms
  • any operator correction that says the issue is broader than a local file or shell problem

Core Rule

If the symptom touches Prism lifecycle, signaling, MCP, install, launcher, or session state, treat it as a Prism incident first and a local Windows bug second. Local debugging may continue, but the incident/RCA artifact must be created as soon as the failure class can be named.

Required Sequence

  1. Name the failure class in one sentence.
  2. Create a Prism incident/RCA artifact:
    • prefer prism_postmortem for a detected error or incident
    • use prism_note only for corrective context attached to an existing incident or when prism_postmortem is unavailable
  3. Verify exact persistence:
    • returned artifact id, prism_diff, or direct artifact listing
  4. Verify discoverability:
    • semantic_recall with distinctive content terms, not just UUID text
  5. Continue the local fix.
  6. Do not call the task complete until the checkpoint, wrap, PR, or signal cites the artifact id.

Windows/Codex Bias Check

Windows/Codex failures often look like local host problems:
  • PowerShell command precedence
  • Start-Process behavior
  • .ps1 vs .cmd shim resolution
  • spawnSync("npm") / spawnSync("npx") behavior
  • stale Codex app-server process trees
  • loopback port allocation
  • stale MCP config on a fresh install
Those details matter for the fix. They do not reduce the Prism obligation. If those local mechanics cause Prism lifecycle symptoms, record the incident.

Done Gate

A Windows/Codex incident-class task is not done until all five are true:
  1. fix or containment exists
  2. Prism incident/RCA artifact id exists
  3. exact persistence was verified
  4. semantic recall was checked with distinctive terms
  5. handoff/checkpoint/wrap/signal cites the artifact id

Worked Example

Repeated Amanda/Codex PeerJoined events on mini1 were caused by orphaned old Codex app-server trees running on stale loopback ports while the active session used a newer port. The engineering fix reaped stale same-identity/same-project app-server trees before starting a new Windows Codex app-server. The method gap was that the engineering fix landed before the incident/RCA artifact. Under SPEC-063 v0.2, the correct behavior is to file the incident as soon as the repeated lifecycle symptom is classified, then update or resolve the artifact as the local fix lands.

Self-Test Prompt

After reading this fragment, the agent must be able to answer:
  • What symptom tells me this is a Prism incident rather than only a Windows launcher bug?
  • Which Prism artifact did I create?
  • How did I verify exact persistence?
  • Which recall query proves the RCA is discoverable?
  • Where did I cite the artifact before declaring the task complete?
Last modified on May 9, 2026