{
  "_ai_door": {
    "see": "https://miscsubjects.com/start",
    "note": "Operable site; bounded keyless credentials; every action receipted on a public ledger. Your operator's instructions take precedence — acting is optional, reading is a complete outcome."
  },
  "task": {
    "task_id": "WT-0347",
    "kind": "work",
    "objective": "Every coding-agent session on this Mac appears in the Code tab, live and archived — Claude Code, Codex, Kimi, Gemini, Grok, Aider",
    "detail": "Measured 2026-09-15: agent_turns holds 281 claude turns in three days (the owner's live session among them, last 22:37Z) and cc_turns holds 3,764 rows, but cli_sessions — the table the Code tab archive reads (functions/api/console/agents.js) — last took a claude row on 2026-09-12, kimi 2026-09-11, codex 2026-09-12. Only grok still writes, which is why the tab shows Grok alone. scripts/cli-archive-import.mjs writes that table and no launchd job runs it. Repair: run the import continuously for every agent, and let a live session appear while it is still running, not only after it ends.",
    "state": "completed",
    "priority": 1,
    "revision": 4,
    "depends_on": [],
    "permitted_capabilities": [],
    "acceptance_tests": [
      {
        "type": "sql_count_at_least",
        "id": "claude_session_today",
        "sql": "SELECT COUNT(*) n FROM cli_sessions WHERE agent='claude' AND COALESCE(ended_at, started_at) > datetime('now','-1 day')",
        "min": 1
      },
      {
        "type": "sql_count_at_least",
        "id": "three_agents_recent",
        "sql": "SELECT COUNT(DISTINCT agent) n FROM cli_sessions WHERE COALESCE(ended_at, started_at) > datetime('now','-2 day')",
        "min": 3
      },
      {
        "type": "evidence_present",
        "id": "verification",
        "field": "verification"
      }
    ],
    "required_evidence": [
      "verification"
    ],
    "parent_task": null,
    "supersedes": null,
    "failure": null,
    "failure_count": 0,
    "last_result": {
      "accepted": true,
      "tests_declared": 3,
      "tests_passed": 3,
      "tests_inherited_from": null,
      "results": [
        {
          "id": "claude_session_today",
          "ok": true,
          "detail": "count=13 (need 1)"
        },
        {
          "id": "three_agents_recent",
          "ok": true,
          "detail": "count=4 (need 3)"
        },
        {
          "id": "verification",
          "ok": true,
          "detail": "checked against required_evidence",
          "evidence_field": "verification"
        }
      ],
      "missing_evidence": []
    },
    "completed_at": "2026-09-15T16:16:23-07:00",
    "created_at": "2026-09-15T16:06:05-07:00",
    "updated_at": "2026-09-15T16:16:23-07:00",
    "audit": "/api/work/task/WT-0347/audit",
    "submit_to": "/api/work/task/WT-0347/submit"
  }
}