Skip to content

[Bug]: Skill Workshop autoCapture agent_end reviews time out and block hooks on routine sessions #87352

Closed

Description

@Countermarch

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

On OpenClaw 2026.5.26, the bundled @openclaw/skill-workshop plugin repeatedly timed out in the agent_end hook during routine successful sessions when autoCapture was enabled, requiring autoCapture to be disabled as a workaround.

Steps to reproduce

  1. Run OpenClaw 2026.5.26 with the bundled @openclaw/skill-workshop plugin enabled.
  2. Configure Skill Workshop with autoCapture enabled and reviewMode set to hybrid.
  3. Let normal agent sessions complete, including long-running or automation-triggered sessions.
  4. Observe gateway logs for the Skill Workshop agent_end hook.

Expected behavior

Skill Workshop auto-capture should either complete its review within its configured timeout or safely skip unsuitable sessions without causing repeated agent_end hook timeout errors.

Actual behavior

The Skill Workshop agent_end handler repeatedly timed out after 30000ms on routine successful sessions. Disabling only plugins.entries.skill-workshop.config.autoCapture stopped new Skill Workshop timeout errors while leaving the plugin installed and manual use available.

OpenClaw version

OpenClaw 2026.5.26 (10ad3aa)
@openclaw/skill-workshop 2026.5.26

Operating system

macOS 26.4.1 (25E253)

Install method

npm/Homebrew global install on macOS LaunchAgent runtime

Model

Default agent model route; exact model does not appear necessary for the observed agent_end timeout.

Provider / routing chain

OpenClaw gateway -> configured agent runtime/model provider; Skill Workshop reviewer is invoked from the plugin agent_end hook.

Additional provider/model setup details

NOT_ENOUGH_INFO

Logs, screenshots, and evidence

OpenClaw 2026.5.26 (10ad3aa)
@openclaw/skill-workshop 2026.5.26

Relevant config before workaround:
plugins.entries.skill-workshop.config.enabled=true
plugins.entries.skill-workshop.config.autoCapture=true
plugins.entries.skill-workshop.config.reviewMode=hybrid
plugins.entries.skill-workshop.config.reviewInterval=15
plugins.entries.skill-workshop.config.reviewMinToolCalls=8
plugins.entries.skill-workshop.config.reviewTimeoutMs=45000

Observed gateway log lines:
2026-05-27T08:25:36.951-04:00 [hooks] agent_end handler from skill-workshop failed: timed out after 30000ms
2026-05-27T10:30:52.549-04:00 [hooks] agent_end handler from skill-workshop failed: timed out after 30000ms

Nearby memory pressure warning before one timeout:
2026-05-27T10:30:09.248-04:00 memory pressure: level=warning reason=rss_threshold rssBytes=1857568768 heapUsedBytes=1556981936 thresholdBytes=1610612736

Source behavior in extensions/skill-workshop/index.ts:
- agent_end returns early when plugin disabled, autoCapture disabled, reviewMode is off, event was unsuccessful, or sessionId starts with skill-workshop-review-.
- It does not appear to skip internal/helper sessions by class, session key, origin, channel, or workspace type.

Local workaround:
plugins.entries.skill-workshop.config.autoCapture=false

After disabling autoCapture:
- Gateway remained healthy.
- No new "agent_end handler from skill-workshop failed: timed out" log entries were observed in the next monitor pass.

Impact and severity

Affected: OpenClaw users with Skill Workshop autoCapture enabled, especially on automation-heavy or long-running gateway installs.
Severity: Medium. The gateway did not crash, but repeated hook timeouts add noise, consume runtime resources, and can interfere with stability monitoring.
Frequency: Repeated twice in the observed window before autoCapture was disabled.
Consequence: Operators may need to disable Skill Workshop autoCapture, losing automatic skill proposal capture until upstream handles unsuitable sessions or timeout containment more gracefully.

Additional information

This appears to be the official bundled Skill Workshop plugin, not a local plugin:

  • Installed package path: <openclaw-install>/dist/extensions/skill-workshop
  • Package name: @openclaw/skill-workshop
  • Source tree: extensions/skill-workshop

Suggested fix directions:

  • Add skip logic for internal/helper sessions and automation contexts that are unlikely to produce useful skills.
  • Ensure reviewer timeout uses the configured reviewTimeoutMs consistently, or clarify why the hook reports 30000ms while config reviewTimeoutMs is 45000.
  • Consider a circuit breaker/backoff for repeated agent_end review timeouts.
  • Consider logging enough redacted context to identify skipped/failed session class without exposing transcript content.

Temporary workaround:

Set plugins.entries.skill-workshop.config.autoCapture=false. This keeps the plugin installed and manual Skill Workshop use available, but disables automatic capture.

Activity

  1. WarrenJones commented on May 27, 2026

    @WarrenJones
  2. clawsweeper commented on May 27, 2026

    @clawsweeper
    Contributor

    Thanks for the context here. I did a careful shell check against current main, and this is already implemented.

    Close: current main now gates Skill Research auto-capture before proposal extraction for helper, automation, cron, hook-scoped, and Active Memory sessions, and the matching regression coverage is present. The fix is proven on main by the merged replacement PR, but I did not find a release tag containing that merge yet.

    I found the merged PR that appears to have closed this: #93653: fix(skill-workshop): skip helper sessions during auto-capture.

    So I’m closing this as already implemented rather than keeping a duplicate issue open.

    Review details

    Best possible solution:

    Keep the current main owner-boundary fix: skip unsuitable helper and automation sessions at Skill Research auto-capture before proposal creation while preserving normal user/manual capture.

    Do we have a high-confidence way to reproduce the issue?

    Yes. The report includes concrete shipped logs, and source inspection identifies the failing path as auto-capture eligibility before proposal extraction on agent_end side effects.

    Is this the best way to solve the issue?

    Yes. The implemented fix is at the Skill Research auto-capture owner boundary, rejects unsuitable sessions before workshop writes, and keeps plugin hook settlement independent.

    Security review:

    Security review: No patch is under review for this issue, and the report is not security-sensitive.

    AGENTS.md: found and applied where relevant.

    What I checked:

    • Current source implements the eligibility gate: runSkillResearchAutoCapture now rejects blocked triggers, Active Memory session keys, and colon-delimited cron/hook/subagent segments before durable proposal extraction or workshop writes. (src/skills/research/autocapture.ts:34, a25c64a4e4e4)
    • Regression coverage exists: The current test table covers subagent, cron, heartbeat, hook-scoped, memory-triggered, and Active Memory helper session forms producing zero proposals while normal capture remains covered. (src/skills/research/autocapture.test.ts:104, a25c64a4e4e4)
    • Agent-end side effects preserve hook behavior: Agent-end side effects run Skill Research auto-capture separately from plugin agent_end hooks, so capture failures remain observational and plugin hook settlement stays on its own path. (src/agents/harness/agent-end-side-effects.ts:18, a25c64a4e4e4)
    • Merged fix provenance: The merged replacement PR implements the helper-session skip and carries forward the contributor fix path plus the reporter's evidence for this issue. (a9df80190234)
    • Fix commit changed the affected files: The merge commit for the fix changed the auto-capture source and focused regression tests for this surface. (src/skills/research/autocapture.ts:34, a9df80190234)
    • Current main matches the fix surface: A diff from the fix merge to current main for the affected source and tests exited cleanly, proving current main still has the merged behavior on those files. (a9df80190234)

    Likely related people:

    • vincentkoc: Merged the replacement PR that implemented the current auto-capture helper-session guard on main. (role: recent area contributor and merger; confidence: high; commits: a9df80190234; files: src/skills/research/autocapture.ts, src/skills/research/autocapture.test.ts, src/agents/harness/agent-end-side-effects.ts)
    • zhangguiping-xydt: Authored the contributor fix path carried forward and credited by the merged replacement PR. (role: source fix contributor; confidence: high; commits: 15d16eb820d6, a9df80190234; files: src/skills/research/autocapture.ts, src/skills/research/autocapture.test.ts, src/agents/harness/agent-end-side-effects.ts)
    • shakkernerd: Authored the merged PR that introduced core Skill Workshop and Skill Research auto-capture, the subsystem affected by this issue. (role: feature introducer; confidence: medium; commits: dcc329ac09ee; files: src/skills/research/autocapture.ts, src/agents/harness/agent-end-side-effects.ts, src/skills/workshop/service.ts)

    Codex review notes: model internal, reasoning high; reviewed against a25c64a4e4e4; fix evidence: merged PR #93653, commit a9df80190234, main fix timestamp 2026-06-16T14:05:23Z.

  3. added
    P2Normal backlog priority with limited blast radius.
    impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.
    issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.
    clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.
    clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.
    clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.
    on May 27, 2026
  4. Countermarch commented on May 31, 2026

    @Countermarch
    ContributorAuthor

    Additional package evidence from OpenClaw 2026.5.28 (e932160): after updating the npm/global package, the installed Skill Workshop runtime still did not include a helper-session skip for Active Memory sessions.

    Observed local behavior and containment:

    • The installed package still needed a local guard so Skill Workshop skips sessions whose id starts with active-memory- or whose session key contains :active-memory:.
    • The guard was applied only in the installed runtime at the Skill Workshop extension entrypoint (dist/extensions/skill-workshop/index.js).
    • The gateway was restarted after the local patch.
    • After the patch set, gateway health was OK and a Codex-backed smoke completed successfully.

    This is related to the original timeout report because Active Memory helper sessions are one concrete internal/helper session class that should not trigger Skill Workshop capture/review work. Suggested acceptance criterion: Skill Workshop autoCapture should skip Active Memory helper sessions before starting reviewer work, without requiring operators to patch the installed runtime or disable autoCapture globally.

    Redactions: omitted local absolute paths, account identifiers, private session keys, chat ids, hook tokens, and process command lines.

  5. added
    clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.
    clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.
    and removed
    clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.
    clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.
    on Jun 15, 2026
  6. locked as resolved and limited conversation to collaborators on Jun 25, 2026
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

    P2Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions