Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

The end-to-end check of Harness's permission rules expects harness --help too (#1253)

Deecf5d30f9813c
diff --git a/cli/e2e/agentClient.e2e.ts b/cli/e2e/agentClient.e2e.ts
index 4f5470970..cba4fce7e 100644
--- a/cli/e2e/agentClient.e2e.ts
+++ b/cli/e2e/agentClient.e2e.ts
@@ -438,9 +438,11 @@ describe('Harness for agents, end to end', () => {
const tools = { ps: 'harness_list', show: 'harness_read', wait: 'harness_wait', new: 'harness_start', close: 'harness_close', send: 'harness_send' }
const verbs = Object.keys(tools) as Array<keyof typeof tools>, launcher = join(d.env.HOME!, '.local', 'bin', 'harness')
// The person's deny of `harness close` is theirs: no allow for it in either spelling (Claude Code does not count the
- // launcher's path as the same command). Its MCP tool is another tool, and is allowed by name.
+ // launcher's path as the same command). Its MCP tool is another tool, and is allowed by name. `harness --help`,
+ // which every harness reads as it starts, comes first: it names no verb (#1239, which left this list as it was,
+ // so this test failed on main from then on).
expect(JSON.parse(readFileSync(settings, 'utf8')).permissions).toEqual({
- allow: ['Bash(npm test:*)', ...verbs.flatMap((verb) => [
+ allow: ['Bash(npm test:*)', 'Bash(harness --help)', 'Bash(harness -h)', `Bash(${launcher} --help)`, ...verbs.flatMap((verb) => [
...(verb === 'close' ? [] : [`Bash(harness ${verb}:*)`, `Bash(${launcher} ${verb}:*)`]),
`mcp__harness__${tools[verb]}`, `mcp__plugin_harness_harness__${tools[verb]}`,
])],