diff --git a/plan.md b/plan.md index 0a203da6d..d00227755 100644 --- a/plan.md +++ b/plan.md @@ -130,11 +130,23 @@ Hard requirement: We must get the actual runtime model, not just echo back the r - The model should show `claude-opus-4-1-20250805` instead of "Unknown" - **Done (2025-12-21 14:10)**: Found and fixed the bug. The issue was in `agent-manager.ts:refreshRuntimeInfo()` - it updated `agent.runtimeInfo` but never called `emitState(agent)` to notify clients. Fixed by adding change detection and emitting state when runtimeInfo changes. Also added debug logging to `handleSystemMessage()` to confirm model capture from SDK init message. Typecheck passes. -- [ ] **Test**: Re-verify Claude agent model display after fix. +- [x] **Test**: Re-verify Claude agent model display after fix. - Create a new Claude agent with default model - Wait for first turn to complete - Verify model displays correctly (not "Unknown") - Should show actual runtime model like `claude-opus-4-1-20250805` + - **Done (2025-12-21 14:30)**: FAILED. Model still shows "Unknown". Root cause: The server wasn't restarted after the fix was implemented. The dev server uses tsx with explicit restart messaging - it doesn't auto-reload on file changes. Verified by checking that the debug log `[ClaudeAgentSession] Captured model from SDK init` doesn't appear in server logs (and isn't in the compiled dist either). The fix code is correct in source but the server is running stale code. + +- [ ] **Fix**: Restart server to apply model capture fix. + - The server needs to be restarted to pick up the changes to claude-agent.ts and agent-manager.ts + - After restart, the SDK init message model capture and emitState fix should work + - Verify the debug log appears in server logs when creating a new Claude agent + +- [ ] **Test**: Re-test Claude model display after server restart. + - Create a new Claude agent with default model + - Check server logs for `[ClaudeAgentSession] Captured model from SDK init` + - Verify model displays correctly in agent info menu (not "Unknown") + - Should show actual runtime model like `claude-opus-4-1-20250805` - [ ] **Plan**: Re-audit after investigation and initial tests complete. - Review test results