Problem
During live Slack + Playwright sessions, agents often generate screenshots in one session folder and then fail to attach them in the next turn/session because attach_file historically required current-session paths.
Observed failure pattern in daemon logs:
Tool [attach_file] ... Error: File path must be within the session directory (...)
- Agent then manually copies files into the current session directory and retries.
This is partially mitigated by PR #148 (cross-session import support in attach_file), but the agent behavior is still brittle because skill guidance is not explicit or discoverable enough.
Why this matters
- Extra tool calls and retries waste tokens and latency.
- Agents appear unreliable even when tools are technically available.
- Skills are becoming too ad hoc; we need a narrower, predictable route for common workflows.
Proposed scope
- Add a first-class skill for screenshot handoff (
playwright-screenshot-handoff) that teaches agents to:
- save screenshots into the current session workspace when possible, and
- use
attach_file directly (or import path) without manual copy loops.
- Add explicit trigger metadata for this skill so it activates for terms like:
playwright, screenshot, attach, send image, upload file.
- Add a concise skill-system cleanup pass (tapering):
- reduce overlapping skill prompts,
- improve deterministic routing for high-frequency operational workflows.
Acceptance criteria
- Agents can complete
navigate -> screenshot -> attach in one pass without path-related retries.
- Session logs show no repeated
attach_file path errors for this workflow.
- Skill triggers are explicit and testable.
- Add tests or scripted evals that assert successful screenshot handoff behavior.
Related
Problem
During live Slack + Playwright sessions, agents often generate screenshots in one session folder and then fail to attach them in the next turn/session because
attach_filehistorically required current-session paths.Observed failure pattern in daemon logs:
Tool [attach_file] ... Error: File path must be within the session directory (...)This is partially mitigated by PR #148 (cross-session import support in
attach_file), but the agent behavior is still brittle because skill guidance is not explicit or discoverable enough.Why this matters
Proposed scope
playwright-screenshot-handoff) that teaches agents to:attach_filedirectly (or import path) without manual copy loops.playwright,screenshot,attach,send image,upload file.Acceptance criteria
navigate -> screenshot -> attachin one pass without path-related retries.attach_filepath errors for this workflow.Related