The cross-harness, self-improving memory layer for AI agents. Join our community: https://discord.com/invite/zdNChS2fBu
Go agent-ai-cliagent-harnessesagent-securitybrowser-extensionciclaude-codecloudcodexcursordetection-engineeringjevknowledge-basememorymobile-device-managementobservabilitysecuritysecurity-information-and-event-managementsecurity-toolstelemetrytraces
fix(lenses): Skills lens keeps withheld command output and skips action-only edits
Claudece1aa31226dc
diff --git a/cli/beacon/internal/endpoint/dashboard/lenses/skills.lens.html b/cli/beacon/internal/endpoint/dashboard/lenses/skills.lens.htmlindex 46c1f851..8a8dbb72 100644--- a/cli/beacon/internal/endpoint/dashboard/lenses/skills.lens.html+++ b/cli/beacon/internal/endpoint/dashboard/lenses/skills.lens.html@@ -68,7 +68,9 @@var NAME_KEYS = ["skill", "skill_name", "skillName", "name", "command"];var PATH_KEYS = ["path", "file_path", "skill_path", "location"];var TEXT_KEYS = ["content", "text", "output", "instructions", "body", "result"];+ // The file.operation values and actions that change a file, as the Files Changed lens counts them.var WRITE_OPS = { create: 1, modify: 1, delete: 1, write: 1, edit: 1, rename: 1, move: 1 };+ var WRITE_ACTIONS = { "file.created": 1, "file.modified": 1, "file.deleted": 1, "file.edited": 1 };var PREVIEW_LINES = 400;var fmt = new Intl.NumberFormat();@@ -117,6 +119,10 @@return "";}+ function withheldContent(content) {+ return content && !content.included ? content : null;+ }+function retained(content) {return content && content.included && typeof content.text === "string" && content.text ? content : null;}@@ -141,7 +147,7 @@var file = event.file;if (file && file.path) {var op = String(file.operation || "").toLowerCase();- var hit = !WRITE_OPS[op] && skillPath(file.path);+ var hit = !WRITE_OPS[op] && !WRITE_ACTIONS[event.action] && skillPath(file.path);if (hit) {return {name: hit.name, path: file.path, how: "Read of SKILL.md",@@ -157,7 +163,8 @@return {name: shown.name, path: shown.path, how: "Shell command: " + command.command,text: retained(command.output),- withheld: command.output && !command.output.included ? command.output : null+ // Output that was not kept leaves no command.output at all; its metadata is on the event.+ withheld: withheldContent(command.output) || (!command.output ? withheldContent(event.content) : null)};}}diff --git a/cli/beacon/internal/endpoint/dashboard/testdata/lens-e2e/fixtures/runtime.jsonl b/cli/beacon/internal/endpoint/dashboard/testdata/lens-e2e/fixtures/runtime.jsonlindex 10ee751c..c50d0b20 100644--- a/cli/beacon/internal/endpoint/dashboard/testdata/lens-e2e/fixtures/runtime.jsonl+++ b/cli/beacon/internal/endpoint/dashboard/testdata/lens-e2e/fixtures/runtime.jsonl@@ -32,3 +32,5 @@{"vendor": "beacon", "product": "endpoint-agent", "schema_version": "1.0", "severity": "info", "endpoint": {"os": "linux"}, "harness": {"name": "claude_code"}, "session": {"id": "skilled", "working_directory": "/work/site"}, "timestamp": "2026-06-14T10:00:30Z", "event": {"id": "sk-call-2", "kind": "agent_runtime", "action": "tool.invoked", "category": "tool"}, "message": "tool.invoked", "tool": {"name": "Skill"}, "gen_ai": {"tool": {"name": "Skill", "call": {"id": "call-skill-2", "arguments": {"skill": "pdf"}}}}}{"vendor": "beacon", "product": "endpoint-agent", "schema_version": "1.0", "severity": "info", "endpoint": {"os": "linux"}, "harness": {"name": "claude_code"}, "session": {"id": "skilled", "working_directory": "/work/site"}, "timestamp": "2026-06-14T10:00:31Z", "event": {"id": "sk-result-2", "kind": "agent_runtime", "action": "tool.completed", "category": "tool"}, "message": "tool.completed", "tool": {"name": "Skill"}, "gen_ai": {"tool": {"name": "Skill", "call": {"id": "call-skill-2", "result": {"success": true, "commandName": "pdf"}}}}}{"vendor": "beacon", "product": "endpoint-agent", "schema_version": "1.0", "severity": "info", "endpoint": {"os": "linux"}, "harness": {"name": "claude_code"}, "session": {"id": "skilled", "working_directory": "/work/site"}, "timestamp": "2026-06-14T10:00:40Z", "event": {"id": "sk-edit", "kind": "agent_runtime", "action": "file.modified", "category": "file"}, "message": "file.modified", "file": {"path": "/work/site/skills/notes/SKILL.md", "operation": "modify", "diff": "@@ -1 +1 @@\n-a\n+b\n"}, "content": {"retention": "full", "included": true}}+{"vendor": "beacon", "product": "endpoint-agent", "schema_version": "1.0", "severity": "info", "endpoint": {"os": "linux"}, "harness": {"name": "claude_code"}, "session": {"id": "skilled", "working_directory": "/work/site"}, "timestamp": "2026-06-14T10:00:45Z", "event": {"id": "sk-edit-action", "kind": "agent_runtime", "action": "file.modified", "category": "file"}, "message": "file.modified", "file": {"path": "/work/site/skills/drafts/SKILL.md"}}+{"vendor": "beacon", "product": "endpoint-agent", "schema_version": "1.0", "severity": "info", "endpoint": {"os": "linux"}, "harness": {"name": "claude_code"}, "session": {"id": "skilled", "working_directory": "/work/site"}, "timestamp": "2026-06-14T10:00:50Z", "event": {"id": "sk-cat-withheld", "kind": "agent_runtime", "action": "command.executed", "category": "command"}, "message": "command.executed", "command": {"command": "sed -n 1,80p ~/.codex/skills/brand-voice/SKILL.md", "exit_code": 0}, "content": {"retention": "metadata", "included": false, "hash": "sha256:fff", "bytes": 512}}diff --git a/cli/beacon/internal/endpoint/dashboard/testdata/lens-e2e/tests/builtin-skills.spec.ts b/cli/beacon/internal/endpoint/dashboard/testdata/lens-e2e/tests/builtin-skills.spec.tsindex 9382856c..b1fb2fd9 100644--- a/cli/beacon/internal/endpoint/dashboard/testdata/lens-e2e/tests/builtin-skills.spec.ts+++ b/cli/beacon/internal/endpoint/dashboard/testdata/lens-e2e/tests/builtin-skills.spec.ts@@ -5,13 +5,15 @@ test('skills: each skill, where it entered the run, and what the agent was told'const frame = page.frameLocator('iframe.lens-frame');await expect(frame.locator('#root')).toBeVisible();- // A Skill tool call (twice), a cat of a SKILL.md and a read of one; an edit of a SKILL.md is not a load.- await expect(frame.locator('#summary')).toHaveText('3 skills loaded 4 times · instructions captured for 2 of 4.');+ // A Skill tool call (twice), two shell reads of a SKILL.md and a file read of one. Edits of a SKILL.md+ // are not loads, whether the event names the write in its operation or only in its action.+ await expect(frame.locator('#summary')).toHaveText('3 skills loaded 5 times · instructions captured for 2 of 5.');const skills = frame.locator('#list button.row');await expect(skills).toHaveCount(3);await expect(skills.nth(0)).toContainText('pdf');await expect(skills.nth(0)).toContainText('×2');await expect(skills.nth(1)).toContainText('brand-voice');+ await expect(skills.nth(1)).toContainText('×2');await expect(skills.nth(2)).toContainText('release-notes');// Claude Code's unnamed OTLP activation is counted, not listed.@@ -38,8 +40,10 @@ test('skills: each skill, where it entered the run, and what the agent was told'// A shell command that printed a SKILL.md: its output is what the agent was told.await skills.nth(1).click();await expect(detail.locator('h2')).toHaveText('brand-voice');- await expect(detail).toContainText('Shell command: cat ~/.codex/skills/brand-voice/SKILL.md');- await expect(detail.locator('pre')).toContainText('No exclamation marks.');+ await expect(loads.nth(0)).toContainText('Shell command: cat ~/.codex/skills/brand-voice/SKILL.md');+ await expect(loads.nth(0).locator('pre')).toContainText('No exclamation marks.');+ // A shell read whose output was not retained keeps its hash and size, from the event's content.+ await expect(loads.nth(1)).toContainText('The text was not retained · retention metadata · 512 bytes · sha256:fff.');// A read whose content was not retained: hash and size instead of text.await skills.nth(2).click();