Skip to content

a365-setup writes placeholder detectedAt (midnight UTC) in detection cache → premature 60-min staleness #74

Description

Skill

a365-setup

Plugin Version

1.0.2

Agent Language / Stack

Node.js LangChain

Bug Description

a365-setup writes the detection cache file (.a365-workspace-detection.local.json) with a
placeholder timestamp of midnight UTC instead of the actual detection time. After a run,
the file contained "detectedAt": "2026-06-17T00:00:00Z" — the model has no wall-clock and
the SKILL.md never instructs it to fetch one, so it fabricates a value. Downstream skills
(make-a365-agent, instrument-observability, add-workiq-tools, test-local) treat the cache
as stale when detectedAt is more than 60 minutes old, so a later same-day session can be
forced into unnecessary re-detection — the exact token/turn waste the cache exists to
prevent.

Steps to Reproduce

  1. Run a365-setup on any agent project ("Register this as Agent 365 Assistive agent with
    auth mode OBO").
  2. Answer the detection/capabilities/auth prompts so the skill writes the cache.
  3. Open .a365-workspace-detection.local.json in the project root.
  4. Observe "detectedAt" is "2026-06-17T00:00:00Z" (midnight), not the real time of the run.

Expected Behavior

$ cat .a365-workspace-detection.local.json
{
"detectedAt": "2026-06-17T00:00:00Z",
"agentStack": "LangChain",
"programmingLanguage": "NodeJS",
"agentType": "system-agent",
"authMode": "obo",
...
}

Actual Behavior

Suggested fix: in a365-setup SKILL.md (Phase 1C cache-write step), instruct the model to

shell out for the real time and use it for detectedAt, e.g.:

date -u +%Y-%m-%dT%H:%M:%SZ -> 2026-06-17T11:54:03Z

Relevant Logs / Screenshots

Environment

Environment:

  • OS: Windows 11
  • Claude Code version: 2.1.179
  • a365 CLI version: 1.1.184
  • Node.js version: 26.1.0
  • Plugin: agent365-skills @ main (commit 1d981b8)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions