Skip to content

No path to install/sync artifacts onto an existing agent — "picked up on next rebuild" is false #82

Description

@juniperbevensee

Found during a read-only audit (2026-06-12).

installBaselineTemplates runs only at agent create (lib/services/harness.ts:243) and duplicate (:1149). restart/rebuild (lib/services/docker.ts restart()) are pure docker-compose operations and never re-install artifacts.

Consequences:

  • Reinstate captcha_cascade + captcha-escalation (CAPSOLVER_API_KEY now provisioned) #81's premise doesn't hold: a reinstated plugin/skill added to infra/artifacts.json will NOT reach already-created agents via rebuild — only newly-created or duplicated agents pick up manifest changes. (Concretely: agents assigned a captcha artifact won't gain captcha_cascade + captcha-escalation from a rebuild, and won't have CAPSOLVER_API_KEY unless it was set at create time.)
  • Any future manifest change has the same problem: existing agents are frozen at their creation-time artifact set; the only current paths are manual copy into the hot-mounted data dir or destroy-and-recreate.

Proposal: an artifacts-sync endpoint, e.g. POST /api/harnesses/:id/artifacts/sync — diff the agent's data dir against infra/artifacts.json (+ assigned env), copy missing plugins/skills, update plugins.enabled, then recreate. Idempotent, additive-only by default (never deletes user-added artifacts), dry-run flag for visibility.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions