Skip to content
5 changes: 4 additions & 1 deletion cmuxTests/CLINotifyProcessIntegrationRegressionTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,8 @@ final class CLINotifyProcessIntegrationRegressionTests: XCTestCase {
XCTAssertTrue(largeCleanup.stderr.contains("listing was incomplete"), largeCleanup.stderr)
}

/// Verifies clear-session SessionStart returns the structured acknowledgement,
/// clears only the current pane, and marks the workspace as running.
func testClaudeClearSessionStartMarksWorkspaceRunning() throws {
let context = try makeClaudeHookContext(name: "claude-clear-running")
defer { context.cleanup() }
Expand All @@ -332,7 +334,8 @@ final class CLINotifyProcessIntegrationRegressionTests: XCTestCase {

XCTAssertFalse(result.timedOut, result.stderr)
XCTAssertEqual(result.status, 0, result.stderr)
XCTAssertEqual(result.stdout, "OK\n")
// SessionStart hooks use the CLI's structured JSON acknowledgement contract.
XCTAssertEqual(result.stdout, "{}\n")
XCTAssertTrue(
context.state.commands.contains { $0 == "clear_notifications --tab=\(context.workspaceId) --panel=\(context.surfaceId)" },
"Expected clear SessionStart to clear only the current pane, saw \(context.state.commands)"
Expand Down
Loading