fix: clear session agent on /start-work to allow mode transition from Prometheus
When transitioning from Prometheus (Planner) to Sisyphus via /start-work, the session agent was not being cleared. This caused prometheus-md-only hook to continue injecting READ-ONLY constraints into sisyphus_task calls. - Add clearSessionAgent() call when start-work command is detected - Add TDD test verifying clearSessionAgent is called with sessionID
This commit is contained in:
@@ -10,6 +10,7 @@ import {
|
||||
clearBoulderState,
|
||||
} from "../../features/boulder-state"
|
||||
import { log } from "../../shared/logger"
|
||||
import { clearSessionAgent } from "../../features/claude-code-session-state"
|
||||
|
||||
export const HOOK_NAME = "start-work"
|
||||
|
||||
@@ -70,6 +71,9 @@ export function createStartWorkHook(ctx: PluginInput) {
|
||||
sessionID: input.sessionID,
|
||||
})
|
||||
|
||||
// Clear previous session agent (e.g., Prometheus) to allow mode transition
|
||||
clearSessionAgent(input.sessionID)
|
||||
|
||||
const existingState = readBoulderState(ctx.directory)
|
||||
const sessionId = input.sessionID
|
||||
const timestamp = new Date().toISOString()
|
||||
|
||||
Reference in New Issue
Block a user